Sunday, July 26, 2009

no such file to load -- builder

For my rails infrastructure, I used to use nginx talking to a mongrel cluster which was painful to figure out how to set it up. (This before the nginx module from Phusion Passenger)

I then switched to using apache which worked well, especially with the php files I also had to host (wordpress/drupal etc).

Last night I tried to go back to nginx.. bleeding edge nginx and Ruby Enterprise.
This was a whole load of pain. :( Google didn't seem helpful. WTF was going on?

Phusion Passenger worked fine with regular ruby (ruby 1.8.7) but when I tried using Ruby Enterprise I would get the following crypted error:

"no such file to load -- builder"

WTF was this all about? I spent all night hacking/slashing trying to get it to run.

It was obviously having a problem finding the 'builder' gem, but it was right there.. wasn't it?
# gem list
builder (2.1.2)

and that was the crux of the problem! REE uses its own gem command and its own location of gem packages.

# /opt/ruby-enterprise-1.8.6-20090610/bin/gem list
** builder not present **

AAARGGH! Apparently this is a good thing, not sure why.. but w-e.

# /opt/ruby-enterprise-1.8.6-20090610/bin/gem install builder


Heres some links for you.

3 comments:

Rajan Chandi said...

Hey thanks...I am facing the same problem. and I am not finding ruby-enterprise in my /opt director.

Need to find the the alternatives.

Thanks...Your post helps.

Cheers,
Rajan

Mischa said...

Hi -- thanks for the link.

Let me try to answer your question about REE--

The reason that it doesn't automatically change your gem command is that you may want to have ree and mri or yarv on the same machine.

To change this, you can do something like:

cd /usr/bin
rm gem
ln -s /opt/ruby-enterpriseXXXXXX/bin/gem

etc, to change the symlinks.

Rajan -- try doing something like find / -name enterprise

or something, no?

Rajan Chandi said...

Hey Thanks.

I got it work before by building RubyGems 1.3.5 locally.