VPS apache config - Invalid PassengerDefaultRuby command after adding last gem for passengers

had this list of rubies in my vps:

   ruby-1.9.2-p320 [ i686 ]
=* ruby-1.9.3-p194 [ i686 ]
   ruby-1.9.3-p374 [ i686 ]
   ruby-1.9.3-p392 [ i686 ]

Today I installed a new application on this vps on ruby 2.0, so I added 2.0 to rvm:

   ruby-1.9.2-p320 [ i686 ]
   ruby-1.9.3-p194 [ i686 ]
   ruby-1.9.3-p374 [ i686 ]
   ruby-1.9.3-p392 [ i686 ]
=* ruby-2.0.0-p247 [ i686 ]

installed passengerand passenger-apache-module, instructions say add these lines:

   LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
   PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19
   PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby

to /etc/apache2/apache2.confand restart apache, after reboot I got this error :

Syntax error on line 242 of /etc/apache2/apache2.conf:
Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!

and another problem when I open the application at http://nccm.md I got:

Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound)

from gem listcommand I see that this stone is installed in ruby ​​2.0 environment, but the application is looking for it in usr/local/rvm/gems/ruby-1.9.3-p194@global. Why is this? Thanks for any help.

+1
1

!

, , - sites-enabled. , apache2.conf:

   LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19/buildout/apache2/mod_passenger.so
   PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.19
   PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby

/etc/apache2/sites-enabled/mysite, , ruby-1.9.3, PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby:

<VirtualHost xxx.xx.xx.xx:80>
  PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby
  ServerName mysite.md
  DocumentRoot /home/apps/myapp/public
  <Directory /home/apps/myapp>
     AllowOverride None
     Options -MultiViews
  </Directory>
</VirtualHost>

, ruby-2.0, PassengerRuby, ruby-2.0 .

, rvm , apache2.config, , :

#   LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.18/ext/apache2/mod_passenger.so
#   PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.18
#   PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby

, , /etc/apache2/sites-enabled/mysite.

!

> 4.0.0. -3.0.8, . , PassengerDefaultRuby 4.0.0 , . modrails.com/documentation/....

+4

All Articles