3

I'm experiencing a server error, which tells me that it cannot detect essential gems such as rake. Research suggests that there's a miscommunication between Phusion Passenger and RVM. RVM recommends setting PassengerDefaultRuby in the server's global configuration file, which in my case is /etc/apache2/apache2.conf. When I insert this line:

PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby

I get this error when restarting Apache:

Syntax error on line 39 of /etc/apache2/apache2.conf:
Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration

Perhaps I'm placing this code in the wrong file? Or maybe something else is going wrong? Any guidance would be greatly appreciated.

Undo
  • 311
  • 6
  • 19
nullnullnull
  • 137
  • 1
  • 6

1 Answers1

3

You need to check if you have the mod_passenger module loaded:

# apachectl -M | grep passenger

The option you refer was included in version 4.0 Release Candidate 6:

Changes in 4.0 RC 5 and RC 6

The most important changes in RC 5 and RC 6 are as follows:

The default config snippet for Apache has changed! It must now contain a PassengerDefaultRuby option. The installer has been updated to output this option. The PassengerRuby option still exists, but it’s only used for configuring different Ruby interpreters in different contexts. Please refer to the manual for more information.

Depending on the installation method, you might have an earlier version.

dawud
  • 15,096
  • 3
  • 42
  • 61
  • Thanks, that was the trick. I'd inherited the project half-built, and just needed to do a clean (and current) install of Phusion. – nullnullnull Aug 04 '13 at 20:27