Search code examples
ruby-on-railsapachepassenger

Apache: Invalid command 'RailsEnv', perhaps misspelled or defined by a module not included in the server configuration


I'm using Rails 3 + Apache + Passenger, and I'm trying to deploy to a new server. I'm not too familiar with where RailsEnv comes from and am getting this error when checking the syntax of my apache config.

Invalid command 'RailsEnv', perhaps misspelled or defined by a module not included in the server configuration

Does anyone know what module RailsEnv comes from ?


Solution

  • Install Apache passenger module, following the guides here for your specific environment: http://blog.phusion.nl/2011/03/02/phusion-passenger-3-0-4-released/

    Then, enable the module using:

    sudo a2enmod passenger
    

    Finally restart apache.