Hi!
I Follow all the steps of the installation. Working perfect in local (Development). Put the config vars in Heroku, restart the server, define user and role. The first time show all the tables in the left but not the information on the right (loading) later just show Unable to authenticate you
Still working perfect in development but not working in production , try to copy from development
Project name : Rails-Impromaq
Rails 6.1.3
pg 1.2.3
Ruby 3.0.0
Heroku stack 20
“database_type”: “postgresql”,
“liana”: “forest-rails”,
“liana_version”: “6.1.1”,
“orm_version”: “6.1.3”
Hello @poluxland,
Do you have more details about the error in the server logs, or in the browser network tab? It will help a lot.
In the meantime, can you check that you properly configured the environment variable forest_application_url=https://rails-impromaq.herokuapp.com
?
Thanks for the reply, I have
now add
But the same problem
Hello @poluxland,
Can you check you secrets.yml
file to check how these environment variables are loaded? You should have something like that:
forest_env_secret: <%= ENV["FOREST_ENV_SECRET"] %>
forest_auth_secret: <%= ENV["FOREST_AUTH_SECRET"] %>
forest_application_url: <%= ENV["APPLICATION_URL"] %>
If it’s the case, you should use APPLICATION_URL
just as before. But if you have values here you have to replace the values by this code to apply env variables correctly
The file is just generated in the installation
Ok, then you need to set a value for FOREST_ENV_SECRET
, FOREST_AUTH_SECRET
and FOREST_APPLICATION_URL
in uppercase.
Change all to uppercase
Development stop working and production still not working
Back to lowercase for development and development began to work.
Production still not working
recheck FOREST_ENV_SECRET match with Heroku
Hello @poluxland,
Sorry, it was not clear. You don’t need to change the content of secrets.yml
, you have to keep declarations in lowercase.
I meant that the environment variables need to be in uppercase. For what I could see, you declared the environment variable forest_application_url
in lowercase whereas it was retrieved in uppercase.
So, to recap, your secrets.yml
needs to be back to
forest_env_secret: <%= ENV["FOREST_ENV_SECRET"] %>
forest_auth_secret: <%= ENV["FOREST_AUTH_SECRET"] %>
forest_application_url: <%= ENV["FOREST_APPLICATION_URL"] %>
And you need to set 3 environment variables on heroku:
FOREST_ENV_SECRET
FOREST_AUTH_SECRET
FOREST_APPLICATION_URL
Sorry my bad. I do it all over again. The problem was, as you indicated, that I put APPLICATION_URL in Heroku (as it says in the installation) but is FOREST_APPLICATION_URL to match with secrets.yml
Really thanks!
1 Like
Thanks for the feedback, we’ll make sure the application reflects the right environment variable.