Go to the project directory and run the below commands one by one:
rvm use ruby-1.8.7-p374
gem install bundler passenger
rvm passenger-install-apache2-module
This will install passenger along with Apache module, mean while you will be asked to add some configuration changes to /etc/apache2/apache2.conf
and do it as such.
Create a file in /etc/apache2/sites-available/
for your site (something like 'www.virtualx.com') and insert this:
<VirtualHost *>
# Change these 3 lines to suit your project
RailsEnv production
ServerName www.virtualx.com
DocumentRoot /var/www/my_project/public # Note the 'public' directory
</VirtualHost>
and set the PassengerRuby
option to ruby-1.8.7-p374
.
Restart Apache service. You are all done.
Now it will work ok.
If you need multiple ruby versions working simultaneously for different projects, then refer here.
Hope it helps :)