debian Tag

I really have enjoyed working with phusion passenger. It’s made rails setup and deployment a breeze. I did have a little trouble getting it running on my server the other day, though. Here’s what I had to do in order to get it working.

First, I had to upgrade RubyGems.

gem update --system

Then, I had to update my path to include the executables that are installed by gems. You can do that by adding a line to the end of your .bashrc file in your home directory.

vi ~/.bashrc
export PATH=$PATH:/var/lib/gems/1.8/bin

Then I ran the passenger installation normally.

gem install passenger
passenger-install-apache2-module

However, running the apache2 module install script gave me this error:

/var/lib/gems/1.8/bin/passenger-install-apache2-module:17: undefined method `require_gem' for main:Object (NoMethodError)

Not to worry, all this means is that RubyGems version 1.3.3 doesn’t include the require_gem method anymore. Changing line 17′s require_gem call to gem does the trick and allows you to install the apache2 module with no problems.

Before:

17
require_gem 'passenger', version

After:

17
gem 'passenger', version

After that, all you have to do is follow the directions for configuring apache and your application will run great!

  • DZone
  • Twitter
  • Slashdot
  • Delicious
  • Digg
  • Technorati Favorites
  • Facebook
  • Reddit
  • StumbleUpon
  • LiveJournal
  • Squidoo
  • Google Bookmarks
  • LinkedIn
  • Share/Bookmark