Apache2, Passenger, Rails in Vagrant Development Environment Caching Despite RailsEnv Development being set

16 views
Skip to first unread message

Daniel Bingham

unread,
Aug 29, 2016, 10:38:10 AM8/29/16
to Phusion Passenger Discussions
I'm running a simple Rails app (built by following the Rails Getting Started Guide) in a Vagrant VM using Apache2 and libapache2_mod_passenger.  I'm having an issue where passenger appears to be caching the code from my Rails app and ignoring the RailsEnv development setting.  

Controllers and Models are cached, views are not.  I can get new Controller or Model code to load by restarting apache2 (sudo service apache2 restart). Rails is correctly picking up the development environment.  When I inspect Rails.env, I get "development", when I inspect Rails.application.config, I find that everything is as it should be if the development environment had been correctly loaded.  When I run the application using rails server from my local machine, instead of through the vagrant, it works fine, no caching. 

So some setting in my passenger setup is causing it to cache Rails code and ignore the development environment setting.  I'm new to passenger and Rails.  I've looked everywhere I can think of for information on caching with passenger, and I can't find anything that looks like it could be remotely responsible.  It doesn't seem like Rails is responsible since Rails is correctly reading the development environment.

What's going on here?

I'm using the following versions:

ruby 2.3.2p120 (2016-05-21 revision 55092) [x86_64-linux] 
Rails 5.0.0.1 
Phusion Passenger 5.0.30

Daniel Knoppel

unread,
Aug 30, 2016, 10:56:23 AM8/30/16
to Phusion Passenger Discussions
Reply all
Reply to author
Forward
0 new messages