11

I'm following these directions to install Rails 3 on my WHM/cPanel VPS. The only change I'm making is to use Ruby 1.9.3 and Rails 3.2.3

However when I get to the command to run "passenger-install-apache2-module" I'm having issues.

First, due to PATH issues I need to go into the correct directory to run the command.

More importantly, once I execute the command I get the error "Could not find passenger (>= 0) amongst [] (Gem::LoadError)" (Full error below).

The square brackets are empty, so I verified that the gems were there via "gem list --local" and passenger is listed.

System Specs:

CENTOS 5.8, WHM 11.32, VPS with root access

Full error:

/home/tekruby/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find passenger (>= 0) amongst [] (Gem::LoadError)
    from /home/tekruby/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /home/tekruby/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /home/tekruby/ruby/gems/bin/passenger-install-apache2-module:22:in `<main>'
Thanos
  • 126
  • 1
  • 3
  • This worked for me, I used rvmsudo, not sudo. See http://stackoverflow.com/questions/4167707/cant-install-passenger-3-on-snow-leopard-with-rvm-and-ruby-1-9-2 – Tal Yaniv Sep 11 '12 at 08:37
  • @Thanos Please accept [the champion answer](http://stackoverflow.com/a/11107949/535406) (hit the check mark on his left). – jibiel Dec 15 '13 at 13:22

4 Answers4

22

You are doing it inside a rails app path, try:

cd ..

and then

passenger-install-apache2-module

I guess it works

Taryn
  • 242,637
  • 56
  • 362
  • 405
Mauro Dias
  • 1,083
  • 1
  • 11
  • 23
12

I just went through this, you can try:

rvmsudo passenger-install-apache2-module

Hope this helps you out.

Anne
  • 26,765
  • 9
  • 65
  • 71
StrongTSQ
  • 171
  • 1
  • 4
1

This problem occurred because of the path issues.

if you are using rvm then please use the following commands to fix it.

rvm list(This will show all the list of ruby version you have in your system)

then

rvm use ruby-1.9.3-p194(Whichever version you want it).

I hope this might help you to solve the problems

cheers Shan

Shan
  • 11
  • 1
  • `rvm list` only showed one version of Ruby installed. I gave the `rvm use ...` command and am still getting the same error. – Thanos May 12 '12 at 17:01
-2

You can try this:

sudo  apt-get install libcurl4-openssl-dev
Anne
  • 26,765
  • 9
  • 65
  • 71
lehazi
  • 1