I have this RoR app that calls to RAILS_ROOT.
When running it using rails server (or when checking with ./script/console) the value contains the app's root.
When deploying and running it with Heroku, however (or when checking with heroku console), the returned path is '/app'.
Why's that?
Thanks
Because on heroku your app is in the /app folder (from the root /).
It is NOT the app folder of your application, which is /app/app.
The file structure is:
/app/app/...
/app/config/..
/app/Gemfile
...
You can make an experiment.
Run heroku console and discover the file structure.
> heroku console
> puts `ls`
> puts `pwd`
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With