# Gem path issue wiith passenger (n00b)dave

**URL:** <https://www.ruby-forum.com/t/gem-path-issue-wiith-passenger-n00b-dave/170958>\
**Category:** Deployment\
**Created:** [June 24, 2009, 1:14pm UTC](https://www.ruby-forum.com/t/gem-path-issue-wiith-passenger-n00b-dave/170958 "2009-06-24T13:14:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [June 24, 2009, 1:14pm UTC](https://www.ruby-forum.com/t/gem-path-issue-wiith-passenger-n00b-dave/170958/1 "2009-06-24T13:14:49Z")

</div>

Hi,

I’m to stage my first rails deployment using passenger and have hit a  
snag.

I think I’ve narrowed it down to a gem path issue. Trouble is, I don’t  
how to fix it.

Can someone point me to the file(s) I need to edit and/or create to fix  
this.

## here is the output from gem env:

RubyGems Environment:

- RUBYGEMS VERSION: 1.3.4
- RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-linux

- GEM PATHS:
  - /usr/lib/ruby/gems/1.8
  - /home/dave/.gem/ruby/1.8

- GEM CONFIGURATION:
  - :update\_sources =\> true
  - :verbose =\> true
  - :benchmark =\> false
  - :backtrace =\> false
  - :bulk\_threshold =\> 1000

- REMOTE SOURCES:
  - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)

* * *

Here is the apache error log:

* * *

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [June 24, 2009, 1:21pm UTC](https://www.ruby-forum.com/t/gem-path-issue-wiith-passenger-n00b-dave/170958/2 "2009-06-24T13:21:43Z")

</div>

oops.

## HERE is the apache error log (snippet):

## [Wed Jun 24 07:14:39 2009] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch Phusion\_Passenger/2.2.4 configured – resuming normal operations /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in `gem_original_require': no such file to load -- fastthread (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in`require’ from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion\_passenger/utils.rb:27 from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:53:in `require’ from /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:53

In the above posted “gem env” output, there seems to be two gem paths  
(one in my home folder). Is that normal?

Also, the error log is flagging “no such file to load – fastthread”,  
even though fastthread is listed as installed using “gem list”.

As a n00b I need fairly explicit instructions, e.g. ‘add this line to  
this file in this directory’, rather than generic ‘you need to fix your  
GEM\_PATH’ type of advice, which seems to be rather plentiful, as opposed  
to helpful…

Thanks!

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [June 25, 2009, 1:29am UTC](https://www.ruby-forum.com/t/gem-path-issue-wiith-passenger-n00b-dave/170958/3 "2009-06-25T01:29:18Z")

</div>

OK I got this solved, but not by figuring out GEM PATH wottsit. That way  
lies madness.

I figure (in hindsight) that my Rails install was b0rked from trying  
this that and the other thing, then forgetting what had already been  
done in my zeal to get it working, no matter what, 6-hours later.

There are a lot of Rails deployment guides out there, and a lot of hard  
ways to set up an apache server to serve rails. They all claim to be  
easy. They lie.

There is also an easy way. No really. It’s called passenger. But you  
already knew that. Thing is, going by google, until you happen to hit  
upon passenger, you will probably hit upon all the other, hard ways  
first, and try them one after the other, until your server is hopelessly  
bolloxedd up, even beyond passenger help. Mea culpa.

Anyhoo, to make a long story longer, I did a complete uninstall of all  
things ruby and rails, as in apt-get purge.

Then I followed this guide:  
[http://www.rubyinside.com/how-to-install-a-ruby-18-stack-on-ubuntu-810-from-scratch-1566.html](http://www.rubyinside.com/how-to-install-a-ruby-18-stack-on-ubuntu-810-from-scratch-1566.html)

Then I ran into a snag here: apt-get -y install libapache2-mod-passenger

## Ruby could not figure out where the heck is passenger:

## [Wed Jun 24 18:23:47 2009] [error] \*\*\* Passenger could not be initialized because of this error: The Passenger spawn server script, ‘/usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion\_passenger/passenger-spawn-server’, does not exist. Please check whether the ‘PassengerRoot’ option is specified correctly.

Sho’ nuff it warnt there.

So I apt-get nuked libapache2-mod-passenger, and gem-installed it  
instead.

That worked.

Presto, I am serving my Rails app through Apache.

About my first post. I was trying to log onto my server VM, and my pc  
forgot which window had focus.

Yes, my pc did that. 😑
