Skip to content

Instantly share code, notes, and snippets.

@chrislerum
Created June 2, 2010 04:43
Show Gist options
  • Save chrislerum/421935 to your computer and use it in GitHub Desktop.
Save chrislerum/421935 to your computer and use it in GitHub Desktop.
cyrus ~: rvm list
rvm rubies
ruby-1.9.2-head [ i386 ]
cyrus ~: rvm 1.9.2-head --default
cyrus ~: rvm 1.9.2-head --passenger
cyrus ~: ruby -v
ruby 1.9.2dev (2010-06-01 revision 28121) [i686-linux]
cyrus ~: gem install passenger
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Successfully installed rake-0.8.7
Successfully installed fastthread-1.0.7
Successfully installed rack-1.1.0
Successfully installed passenger-2.2.13
4 gems installed
cyrus ~: rvmsudo passenger-install-apache2-module
[sudo] password for chris:
Welcome to the Phusion Passenger Apache 2 module installer, v2.2.13.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
--------------------------------------------
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /home/chris/.rvm/gems/ruby-1.9.2-head/gems/passenger-2.2.13/ext/apache2/mod_passenger.so
PassengerRoot /home/chris/.rvm/gems/ruby-1.9.2-head/gems/passenger-2.2.13
PassengerRuby /home/chris/.rvm/rubies/ruby-1.9.2-head/bin/ruby
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
<VirtualHost *:80>
ServerName www.yourhost.com
DocumentRoot /somewhere/public # <-- be sure to point to 'public'!
<Directory /somewhere/public>
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
</Directory>
</VirtualHost>
And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:
/home/chris/.rvm/gems/ruby-1.9.2-head/gems/passenger-2.2.13/doc/Users guide Apache.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
cyrus ~: sudo vim /etc/apache2/httpd.conf
then i put these 3 lines in httpd.conf:
LoadModule passenger_module /home/chris/.rvm/gems/ruby-1.9.2-head/gems/passenger-2.2.13/ext/apache2/mod_passenger.so
PassengerRoot /home/chris/.rvm/gems/ruby-1.9.2-head/gems/passenger-2.2.13
PassengerRuby /home/chris/.rvm/rubies/ruby-1.9.2-head/bin/ruby
...then i changed that last line to read:
PassengerRuby /home/chris/.rvm/bin/passenger_ruby
then restart apache
then i get the error seen here: http://dbespta.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment