2

I want to build passenger-3.0.19 apache2 module on a debian squeeze server. After calling passenger-install-apache2-module as root i get the following error message:

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

Where is the problem? How can i fix this? Using passenger-install-apache2-module --trace doesn't work (for full stacktrace).

no such file to load -- rubygems/builder

whitenexx
  • 1,350
  • 2
  • 25
  • 53

7 Answers7

5

I used the newest passenger version (actually 4.0.0.rc4) from git repository and created a gem. Using this gem worked fine.

git clone https://github.com/FooBarWidget/passenger.git
cd passenger
gem build passenger.gemspec
gem install passenger-*.gem

After that you can build the apache2 plugin using passenger-install-apache2-module.

whitenexx
  • 1,350
  • 2
  • 25
  • 53
  • It's work for me when I install Apache, PHP, Ruby from source with other path install – tquang Mar 13 '13 at 03:50
  • 4
    Rather than cloning it by hand, you can directly call `gem install passenger --pre` to install 4.0.0.rc4. [source](https://github.com/FooBarWidget/passenger/pull/71#issuecomment-14714397) – iliis Mar 19 '13 at 00:08
4

I had a similar environment (passenger 3.0.9, Ruby 1.8.7) and i solved the problem by downgrading rubygems.

The latest stable RVM will install rubygems v(2+). I downgraded to rubygems v(1.6.2), reinstalled the passenger gem and the problem went away.

in an RVM environment the command is gem update --system 1.6.2

The 1.8.x version of rubygems also works, but it throws too many deprecation warnings on everything you do.

mastaBlasta
  • 5,700
  • 1
  • 24
  • 26
2

I answered a similar question a few minutes ago, here: Passenger: cannot load such file rubygems/builder

Essentially is an issue with Ruby 2.0. I offer a possible solutions there (extracted from a github comment).

If you're not using Ruby 2.0 then perhaps you need to do: gem install builder

Community
  • 1
  • 1
fmendez
  • 7,250
  • 5
  • 36
  • 35
  • I'm using ruby 1.8 from debian squeeze repository: ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] - gem install builder didn't help – whitenexx Mar 05 '13 at 21:12
  • @whitenexx downgrading from Rubygems 2.x to a lower version should fix the issue on Ruby 1.8 – John Douthat Mar 11 '13 at 18:58
2

If you are running Ruby 2

Edit the file config/rubber/rubber-passenger.yml and

Change the line

passenger_version: 3.0.19

To

passenger_version: 4.0.35 # works fine with 4.0.35 but you can try a newer version

Remember to check the Ruby version in config/rubber/rubber-ruby.yml

ruby_version: 2.0.0-p247
DoctorRu
  • 1,063
  • 1
  • 13
  • 15
  • But a warning: "In the RC 2 announcement we merely claimed that we encountered a lot of bugs (for example this one) in Ruby 2.0.0 itself, and that we therefore would NOT recommend using Ruby 2.0.0 yet. These bugs have got nothing to do with Phusion Passenger. Phusion Passenger supports Ruby 2.0.0 regardless of what bugs Ruby 2.0.0 has." from Passenger FAQ. – DoctorRu Jan 26 '14 at 04:25
0

Make sure you got zlibc.

sudo apt-get install zlibc zlib1g zlib1g-dev

then reinstall or recompile ruby.

0

Had exactly the same problem. On Amazon Linux, following worked fine:

gem install passenger && passenger-install-apache2-module

Running 'gem install passenger' added the latest version to the system. Removed the old one too:

#gem list passenger

*** LOCAL GEMS ***
passenger (4.0.10, 3.0.19)

#gem uninstall passenger

Select gem to uninstall:
 1. passenger-3.0.19
 2. passenger-4.0.10
 3. All versions
> 1
Successfully uninstalled passenger-3.0.19
0

I had the same issue. To resolve this I had to downgrade rubygems package. My configuration was passenger 3.0.2 and rubygems 1.3.7.

roman
  • 5,100
  • 14
  • 44
  • 77