# Production not working with Rails feature

**URL:** <https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366>\
**Category:** Help me!\
**Created:** [April 23, 2021, 2:15pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366 "2021-04-23T14:15:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 23, 2021, 2:15pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/1 "2021-04-23T14:15:24Z")

</div>

Hello. So, I had this issue with installing Rails feature in my project, and I managed to do it and work in development mode. However, I’m having issues with the production part.

## Expected behavior

It is expected that the production environment works well and the Dashboard has no errors.

## Actual behavior

In production, I already put all the correct keys and auth in my ENV variables. This morning, the project was not working and I was getting

 ![Captura de pantalla de 2021-04-22 17-24-34](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/2/2680bf29fbc222934e2a2dd5c45cb83746596b02.png)

Howevere, and I don’t know how, it start working and I don’t know why! But, when I start designing my Dahsboard, I get the next thing:

 ![Captura de pantalla de 2021-04-23 08-44-14](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b66ab80a581e07cc5bff25e01bf30ae30d069aed.png)

## Failure Logs

This are some Logs and Network Tab screenshots about the calls:

 ![Captura de pantalla de 2021-04-23 08-45-13](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/c/c06889e1a2146c757abefaefc180dff096be0a22.png) ![Captura de pantalla de 2021-04-23 08-45-07](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/7c2d2eee188fce0ad1c40069e093733148768a83.png) ![Captura de pantalla de 2021-04-23 08-44-32](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/2/27b7d516a23e29b10b209b7749d050f2028f7d7c.png) ![Captura de pantalla de 2021-04-23 08-44-28](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/75d49b0816956b95979ecaca759ffd165a3af58f.png) ![Captura de pantalla de 2021-04-23 08-44-14](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b66ab80a581e07cc5bff25e01bf30ae30d069aed.png)

 ![Captura de pantalla de 2021-04-23 08-43-31](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b90889dad93ca3d81acb73b773502428c209105e.png) ![Captura de pantalla de 2021-04-23 07-39-57](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d324f84cf39de9fbdad0896310416ce2ad64bc9f.png) ![Captura de pantalla de 2021-04-23 07-39-44](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/7/71d117bb06601929a8336c7b1a98590fb15e39d0.png) ![Captura de pantalla de 2021-04-23 07-39-29](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e5a27743edf5d3c431b152b35b4900c0e83c9bb5.png)

## Context

- Package Version: The gem `forest_liana@6.3.1` and `rails@6.1.0`
- Project Name: Arkangel AI Rails

Deployed in GCP App Engine Feature.

---

<div class="post-metadata">

**Author:** ![anon16419211](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anon16419211](https://community.forestadmin.com/u/anon16419211)\
**Post date:** [April 23, 2021, 2:51pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/2 "2021-04-23T14:51:14Z")

</div>

Can you give more info on the chart you are trying to setup ?

It could be also nice to have more information on the origin of the error 400. Why is your server not responding to this url and etc…

Thanks for the new thread creation by the way ! 🙂

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 23, 2021, 3:15pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/3 "2021-04-23T15:15:39Z")

</div>

So now is not working. It appears is, again, disconnected.

 ![Captura de pantalla de 2021-04-23 10-13-17](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/5/523dbdd945120ef4571b9afeaad9be9058f6a0ff.png) ![Captura de pantalla de 2021-04-23 10-12-54](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/4d700fb03106c3110056725df9da4e9ace44e08b.png) ![Captura de pantalla de 2021-04-23 10-12-48](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/f/f6c6be641244f39500a3c54083d9d6cfaf499e68.png) ![Captura de pantalla de 2021-04-23 10-12-37](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d52940b09bd9359c37460760728d10608bb6c8e1.png) ![Captura de pantalla de 2021-04-23 10-11-55|690x387]  
(upload://k2vcGbzpUTUIFPaHyH5uQmP9df.png)

 ![Captura de pantalla de 2021-04-23 10-15-09](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/efb09f8f1a23e33eceba6c86e13462dc4b4397a5.png) ![Captura de pantalla de 2021-04-23 10-14-53](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/e/e73fbeba41acc693a780131ff89c4f4647254879.png) ![Captura de pantalla de 2021-04-23 10-14-33](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/44747e4436a99d656ac8ff97f09dcabbf0873597.png)

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [April 26, 2021, 8:37am UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/4 "2021-04-26T08:37:58Z")

</div>

Hi @Santiago_Giraldo,

It seems there are issues with authentication.  
To provide us a complete log of what happened, can you please export a HAR of the network calls?  
This can be done with Chrome, in the dev tools, under the network tabs, right-click on the network calls stack and select “export as HAR”.

Thank you

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [April 26, 2021, 8:52am UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/5 "2021-04-26T08:52:41Z")

</div>

Hi again @Santiago_Giraldo,

After discussion with my teammates, a possible cause is that you have multiples instances of your production server.  
Please note that (if it is the case) all instances should share the same client-id, to do this it is required to define a static client-id.

Documentation about how to set up a static client-id can be found [here](https://docs.forestadmin.com/documentation/how-tos/maintain/upgrade-notes-rails/upgrade-to-v6#setup-a-static-clientid).  
If this does not fix your case, please consider providing HAR as mentioned in my first message

Regards

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 26, 2021, 2:45pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/7 "2021-04-26T14:45:44Z")

</div>

Hi @Sliman_Medini,

I tried the client\_id thing, but it didn’t work, still with the same problem. As you told me, here is the HAR file you were asking for

> **[app.forestadmin.com.har](https://drive.google.com/file/d/1tb-CwBjJ3tny7hfC4UE5nDopLY2wfxoB/view?usp=sharing)**
>
> Google Drive file.

I wasn’t able to upload it directly, so I generate a drive link so you can download it.

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [April 26, 2021, 3:24pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/8 "2021-04-26T15:24:22Z")

</div>

Ok @Santiago_Giraldo,

Do you have multiple instances for your production server?

Thank you

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 26, 2021, 3:26pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/9 "2021-04-26T15:26:30Z")

</div>

Since I’m deploying in GCP, it has a load balancer which creates more instances if necessary. But I just have 1 App Engine project where I deploy it.

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [April 27, 2021, 6:57am UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/10 "2021-04-27T06:57:42Z")

</div>

Hi @Santiago_Giraldo,

Thanks for the HAR file.  
We can see the following error message in it:

```javascript
"{\"errors\":[{\"status\":400,\"detail\":\"The redirect uri must be one of https://app.arkangel.ai/forest/authentication/callback. Received \\\"https://app-live-287415.uc.r.appspot.com/forest/authentication/callback\\\"\",\"meta\":{},\"name\":\"InvalidRedirectUriError\"}]}"

```

Can I ask you:

- which value you defined for your `APPLICATION_URL` environment variable in production?
- the `forest_client_id` you have setup in production using the [documentation](https://docs.forestadmin.com/documentation/how-tos/maintain/upgrade-notes-rails/upgrade-to-v6#setup-a-static-clientid).

It looks like there is something inconsistent in your production environment between the endpoint defined on Forest Admin and the `clientId` URL.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 27, 2021, 3:02pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/11 "2021-04-27T15:02:57Z")

</div>

Hi @arnaud

So you are right. I changed the APPLICATION\_URL when creating the static cilent\_id. Now is working. However, I still have errors in my dashbord. I can’t create new dashboard or values. I get this:

 ![Captura de pantalla de 2021-04-27 10-01-50](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b6c0564626865fbc00b8adb59fb2eac64d8ba031.png) ![Captura de pantalla de 2021-04-27 10-00-50](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/6/67244924f5072c6e64febfb6fcfb9855e752a8e4.png) ![Captura de pantalla de 2021-04-27 10-00-56](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/4/49d79fbe954147f06b5ad2821d88f92e1b00c0fc.png)

I don’t know if I have to create something inside my app for it to work. In my app logs I get the next thing:

 ![Captura de pantalla de 2021-04-27 10-06-50](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/a/a10d278d995321998eb9d8d3f135d3034804cb37.png)

I think it can be a bug, since the filter method is not defined inside my project

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [April 27, 2021, 4:23pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/12 "2021-04-27T16:23:29Z")

</div>

And do those similar charts work in your local environment?  
Does it work if you recreate those charts in the production UI?

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 27, 2021, 5:26pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/13 "2021-04-27T17:26:28Z")

</div>

Nope, it doesn’t work either.

 ![Captura de pantalla de 2021-04-27 12-25-28](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/1/1826f84deaf2fb0f5e77c51048cc9bd9c22f11dd.png)

This is the log I get in my local machine

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [April 28, 2021, 6:24am UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/14 "2021-04-28T06:24:37Z")

</div>

Hello @Santiago_Giraldo,

I have a quick question regarding the last error you faced. `filter_map` has been added from [ruby 2.7](https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-filter_map).  
What is your version of ruby in development and on your production servers?

Let me know 🙂

---

<div class="post-metadata">

**Author:** ![Santiago\_Giraldo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/santiago_giraldo/32/1362_2.png) [@Santiago\_Giraldo](https://community.forestadmin.com/u/Santiago_Giraldo)\
**Post date:** [April 28, 2021, 8:13pm UTC](https://community.forestadmin.com/t/production-not-working-with-rails-feature/2366/15 "2021-04-28T20:13:46Z")

</div>

Thanks @Guillaume_Cisco !! I had the 2.6, and I installed the 2.7 and is working! Thank you so much 😃
