Passenger keeps forgetting the GEM Path


#1

I’ve now set the GEM Path in my environment.rb file, all of the time, as well as putting the fix in the config.ru file to force the rails_env = rack_env. However, every so often Passenger seems to forget and starts looking for Gems outside of my defined path. Usually a touch tmp/restart.txt will fix it, but its rather annoying.

Has anyone else seen this, and can anyone suggest a fix?


#2

So the solution seems to be to do a bundle install --deployment, and that behavior ceases as all calls to bundler automatically go to the vendor/bundle to get gems.


#3

Spoke too soon. It went back to looking for gems in the wrong place again.