Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passenger: cannot load such file rubygems/builder

I was trying to install passenger with Apache2 and ruby 2.0, and I had this line of error when I am doing:

passenger-install-apache2-module

Error:

--------------------------------------------
Compiling and installing Apache 2 module...
cd /usr/local/lib/ruby/gems/2.0.0/gems/passenger-3.0.19
/usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2 RELEASE=yes
# /usr/local/bin/ruby /usr/local/bin/rake apache2:clean apache2 RELEASE=yes
rake aborted!
cannot load such file -- rubygems/builder

(See full trace by running task with --trace)

--------------------------------------------

It looks like something went wrong

I tried:

gem install builder

But this error still occurs. How can I solve it?


Edit

Ruby Version:

2.0 p2

Gem List:

bigdecimal (1.2.0)
builder (3.2.0)
bundler (1.3.1)
daemon_controller (1.1.1)
fastthread (1.0.7)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
passenger (3.0.19)
psych (2.0.0)
rack (1.5.2)
rack-protection (1.4.0)
rake (0.9.6)
rdoc (4.0.0)
sinatra (1.3.5)
test-unit (2.0.0.0)
tilt (1.3.4)
like image 928
SwiftMango Avatar asked Mar 05 '13 19:03

SwiftMango


2 Answers

Updated instructions:

$ gem install passenger --version 4.0.0.rc6
$ passenger-install-apache2-module
like image 73
Sam Ruby Avatar answered Nov 04 '22 22:11

Sam Ruby


There's seems to be problems with Ruby 2.0 and passenger as pointed on this reported issue:Passenger Ruby 2.0 issue

One of the proposed solutions (can be found on one of the comments there):

git clone https://github.com/FooBarWidget/passenger.git
cd passenger
gem build passenger.gemspec
gem install passenger-3.9.5.rc3.gem (or type your actual built gem name)

Edit:

To simplify the process a pre-release version (pointing to whatever latest RC version) can also be installed in the following fashion:

gem install passenger --pre
like image 29
fmendez Avatar answered Nov 04 '22 22:11

fmendez