Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running Ubuntu 10.04 and I've transferred over some sites built in Sinatra. I've set up Phusion passenger, but when I visit the sites I'm getting a Passenger LoadError claiming that passenger has 'no such file to load -- sinatra' yet when I run gem list or sudo gem list, I clearly see sinatra listed. Why can't passenger find this gem?

My sudo gem env output looks like this

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

running 'sudo ruby -v' I see the following:
ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.01

Is that correct, or should the two ruby versions match up correctly, displaying REE in both?

Thanks in advance!

share|improve this question
    
What is your PassengerRuby ? It should be /usr/local/bin/ruby in this case –  Casual Coder May 19 '10 at 11:52
    
Check absolute path with type ruby if it says /usr/local/bin/ruby then it is correct. Check also type gem to be sure that you are using /usr/local/bin/gem (from Ruby EE) –  Casual Coder May 19 '10 at 11:54
    
@CasualCoder when I do type ruby if says /usr/local/bin/ruby and type gem says /usr/local/bin/gem it says both are hashed. How do I check PassengerRuby? –  purpletonic May 20 '10 at 8:06

1 Answer 1

up vote 2 down vote accepted

Check your Passenger module configuration files. In my case

content of /etc/apache2/mods-enabled/passenger.load:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger2.2.5/ext/apache2/mod_passenger.so

content of /etc/apache2/mods-enabled/passenger.conf:

<IfModule mod_passenger.c>
  PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5
  PassengerRuby /usr/local/bin/ruby
</IfModule>

PassengerRuby is telling module what ruby interpreter to use.

share|improve this answer
    
Thanks Casual Coder, looks like my passenger.conf isn't set up correctly. It looks like the following: <IfModule mod_passenger.c> PassengerRoot /usr PassengerRuby /usr/bin/ruby </IfModule> They should both be set-up using the variables we found by running type ruby, right? –  purpletonic May 20 '10 at 8:36
    
Works perfectly. Cheers Casual Coder. –  purpletonic May 20 '10 at 8:46
    
Right. PassengerRuby /usr/local/bin/ruby –  Casual Coder May 20 '10 at 8:47
    
Glad I was helpful. Cheers. –  Casual Coder May 20 '10 at 8:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.