Ruby-on-rails – How to restart Phusion Passenger + Apache in Production mode on Ubuntu server for Ruby on Rails

apachepassengerruby-on-railsruby-on-rails-3

I am having Apache + phusion passenger, I have put

RailsEnv production

in /etc/apache2/sites-available/default file and have restarted apache but when I am running

rails c
> Rails.env.production?

it gives fales where as for

> Rails.env.development?

it gives true. Is there any other way to restart passenger as I do think putting "RailsEnv production" in default is the right way ? btw I am using

sudo service apache2 restart

How to start my ruby on rails app in Production mode with passenger + apache ?

Best Answer

just create a restart.txt in tmp dir of your app

e.g.

  touch %RAILS_ROOT%/tmp/restart.txt

look here http://www.modrails.com/documentation/Users%20guide%20Apache.html section 3.3

Related Topic