Search code examples
ruby-on-railsrubygemsenvironment-variablesdevelopment-environment

Ruby on rails KeyError environment variable


I experience an error : 'fetch': key not found: "APPLICATION_HOST" (KeyError)'

This errors occurres since I tried to implement a new gem that requires dotenv gem. That produced a lot of tries to fix. I revert my code to a stable one but I still cannot run my app supposed related to my machine configuration.

For now none of my environment variables in my .env file can be read by the app.

A teammate has the same code as mine and hasn't any config in his ~/.bashrc neither in ~/.bash_profileand our .env file has chown readable states.

Last information we use a gemset for this project.

Thanks by advance for any help


Solution

  • I solved the problem by cloning the repo in another folder and the project runs again!