Re: [Rails] Passenger can't find rails gem

49 views
Skip to first unread message

Leonardo Mateo

unread,
Jul 7, 2010, 9:12:03 AM7/7/10
to rubyonra...@googlegroups.com
On Wed, Jul 7, 2010 at 7:21 AM, Sam Kong <li...@ruby-forum.com> wrote:
> Hi,
>
> I installed rvm on my OS X Snow Leopard.
> And I installed ruby 1.8.7 and gemset rails3.
> I also installed passenger.
>
> My rails app runs find with 'rails server'.
> However it doesn't run on passenger.
>
> Error message is:
> Could not find gem 'rails (= 3.0.0.beta4, runtime)' in the gems
> available on this machine. (Bundler::GemNotFound)
>
> I added the following line to config.ru:
> ENV["GEM_PATH"] = "/Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3"
>
> /etc/apache2/other/passenger.conf has the following:
> LoadModule passenger_module
> /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
> PassengerRoot
> /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3/gems/passenger-2.2.15
> PassengerRuby /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby
>
>
> Why can't passenger find rails?

How did you installed passenger? I think you must install it using
rvmsudo if you're using RVM:
rvmsudo passenger-install-apache2-module

Take a look at this:
http://rvm.beginrescueend.com/integration/passenger/


>
> Thanks.
>
> Sam
>
> ------ADDITIONAL INFO-------
>
> gem env is
> RubyGems Environment:
>  - RUBYGEMS VERSION: 1.3.7
>  - RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.0.0]
>  - INSTALLATION DIRECTORY: /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3
>  - RUBY EXECUTABLE: /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby
>  - EXECUTABLE DIRECTORY:
> /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3/bin
>  - RUBYGEMS PLATFORMS:
>    - ruby
>    - x86-darwin-10
>  - GEM PATHS:
>     - /Users/ssk/.rvm/gems/ruby-1.8.7-p299@rails3
>     - /Users/ssk/.rvm/gems/ruby-1.8.7-p299@global
>  - GEM CONFIGURATION:
>     - :update_sources => true
>     - :verbose => true
>     - :benchmark => false
>     - :backtrace => false
>     - :bulk_threshold => 1000
>  - REMOTE SOURCES:
>     - http://rubygems.org/
>
>
> *** LOCAL GEMS ***
>
> abstract (1.0.0)
> actionmailer (3.0.0.beta4)
> actionpack (3.0.0.beta4)
> activemodel (3.0.0.beta4)
> activerecord (3.0.0.beta4)
> activeresource (3.0.0.beta4)
> activesupport (3.0.0.beta4)
> arel (0.4.0)
> builder (2.1.2)
> bundler (0.9.26)
> erubis (2.6.6)
> fastthread (1.0.7)
> i18n (0.4.1)
> mail (2.2.5)
> memcache-client (1.8.5)
> mime-types (1.16)
> mysql (2.8.1)
> passenger (2.2.15)
> polyglot (0.3.1)
> rack (1.2.1, 1.1.0)
> rack-mount (0.6.6)
> rack-test (0.5.4)
> rails (3.0.0.beta4)
> railties (3.0.0.beta4)
> rake (0.8.7)
> rdoc (2.5.8)
> text-format (1.0.0)
> text-hyphen (1.0.0)
> thor (0.13.7)
> treetop (1.4.8)
> tzinfo (0.3.22)
> --


--
Leonardo Mateo.
There's no place like ~

Sam Kong

unread,
Jul 7, 2010, 1:01:26 PM7/7/10
to rubyonra...@googlegroups.com
Leonardo Mateo wrote:
> On Wed, Jul 7, 2010 at 7:21 AM, Sam Kong <li...@ruby-forum.com> wrote:
>> Could not find gem 'rails (= 3.0.0.beta4, runtime)' in the gems
>> PassengerRuby /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby
>>
>>
>> Why can't passenger find rails?
>
> How did you installed passenger? I think you must install it using
> rvmsudo if you're using RVM:
> rvmsudo passenger-install-apache2-module
>
> Take a look at this:
> http://rvm.beginrescueend.com/integration/passenger/

Yes, I used rvmsudo.

Thank you.

Sam

>
>
>
>
>> �- RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.0.0]
>> �- GEM CONFIGURATION:
>>
>> erubis (2.6.6)


>> rack-test (0.5.4)
>> rails (3.0.0.beta4)
>> railties (3.0.0.beta4)
>> rake (0.8.7)
>> rdoc (2.5.8)
>> text-format (1.0.0)
>> text-hyphen (1.0.0)
>> thor (0.13.7)
>> treetop (1.4.8)
>> tzinfo (0.3.22)
>> --
>
>
> --
> Leonardo Mateo.
> There's no place like ~

--
Posted via http://www.ruby-forum.com/.

rholmes

unread,
Jul 24, 2010, 3:34:13 PM7/24/10
to Ruby on Rails: Talk
I fixed this on my machine as follows:

The boot.rb file is the one that was generating this message, in a
method called 'load_rails_gem'. If you print the value of the
variable 'load_error' it will give you a specific error message as to
why the gem wouldn't load. In my case, it was a mismatched version of
rack; I installed a down-revision and everything worked.

-Richard.

On Jul 7, 12:01 pm, Sam Kong <li...@ruby-forum.com> wrote:
> Leonardo Mateo wrote:
> > On Wed, Jul 7, 2010 at 7:21 AM, Sam Kong <li...@ruby-forum.com> wrote:
> >> Could notfindgem'rails(= 3.0.0.beta4, runtime)' in the gems
> >> PassengerRuby /Users/ssk/.rvm/rubies/ruby-1.8.7-p299/bin/ruby
>
> >> Whycan'tpassengerfindrails?
>
> > How did you installedpassenger? I think you must install it using
> > rvmsudo if you're using RVM:
> > rvmsudopassenger-install-apache2-module
>
> > Take a look at this:
> >http://rvm.beginrescueend.com/integration/passenger/
>
> Yes, I used rvmsudo.
>
> Thank you.
>
> Sam
>
>
>
>
>
>
>
> >> - RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.0.0]
> >> -GEMCONFIGURATION:
>
> >> erubis (2.6.6)
> >> rack-test (0.5.4)
> >>rails(3.0.0.beta4)

Sam Kong

unread,
Jul 24, 2010, 5:02:22 PM7/24/10
to rubyonra...@googlegroups.com
Sam Kong wrote:

> rholmes wrote:
>> I fixed this on my machine as follows:
>>
>> The boot.rb file is the one that was generating this message, in a
>> method called 'load_rails_gem'. If you print the value of the
>> variable 'load_error' it will give you a specific error message as to
>> why the gem wouldn't load. In my case, it was a mismatched version of
>> rack; I installed a down-revision and everything worked.
>>
>> -Richard.
>
> Thanks Rechard.
>
> I'll try that.
>
> Sam

Oops!

I misspelled your name, Richard.
Sorry.

Sam

Reply all
Reply to author
Forward
0 new messages