1

Wanna ask similar to the following stuff but could not end up in any conclusion:

Could not find rake-10.1.0 in any of the sources

have deployed my app on phusion-passenger (apache). I am getting the same error as already asked in the above question. Editing file and uploding again and again has become quite irritation to me. Any suggestions would be immensely helpful.

When I check the version rake..its showing 0.9.2.2. but I have already installed the rake 10.0.1 and its there in Gemfile as well.

Checked the $GEM_PATH and modified the .bashrc with the following content:

    export HPATH=$HOME
    export GEM_HOME=$HPATH/ruby/gems
    export GEM_PATH=$GEM_HOME:/usr/lib64/ruby/gems/1.9.3
    export GEM_PATH=$GEM_HOME:$GEM_PATH:/usr/lib64/ruby/gems/1.9.3/gems
    export GEM_CACHE=$GEM_HOME/cache
    export PATH=$PATH:$HPATH/ruby/gems/bin
    export PATH=$PATH:$HPATH/ruby/gems

Error message:

  Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)

Exception class:

   PhusionPassenger::UnknownError

Backtrace:

#   File    Line    Location
0   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/spec_set.rb   92  in `block in materialize'
1   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/spec_set.rb   85  in `map!'
2   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/spec_set.rb   85  in `materialize'
3   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/definition.rb     114     in `specs'
4   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/definition.rb     159     in `specs_for'
5   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/definition.rb     148     in `requested_specs'
6   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/environment.rb    18  in `requested_specs'
7   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler/runtime.rb    13  in `setup'
8   /usr/lib64/ruby/gems/1.9.3/gems/bundler-1.3.5/lib/bundler.rb    120     in `setup'
9   /etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb     326     in `prepare_app_process'
10  /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb  156     in `block in initialize_server'
11  /etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb     563     in `report_app_init_status'
12  /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb  154     in `initialize_server'
13  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb   204     in `start_synchronously'
14  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb   180     in `start'
15  /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb  129     in `start'
16  /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb     253     in `block (2 levels) in spawn_rack_application'
17  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb    132     in `lookup_or_add'
18  /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb     246     in `block in spawn_rack_application'
19  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb    82  in `block in synchronize'
20      prelude>    10:in `synchronize'
21  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb    79  in `synchronize'
22  /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb     244     in `spawn_rack_application'
23  /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb     137     in `spawn_application'
24  /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb     275     in `handle_spawn_application'
25  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb   357     in `server_main_loop'
26  /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb   206     in `start_synchronously'
27  /etc/httpd/modules/passenger/helper-scripts/passenger-spawn-server  99  in `
Community
  • 1
  • 1
JstRoRR
  • 3,693
  • 2
  • 19
  • 20

2 Answers2

2

First of all, you should upgrade Phusion Passenger. You're on version 3 which is over a year old. Version 4 is not only better, it has better and more helpful error messages.

Your problem is almost definitely caused by the fact that environment variables are not set properly. Setting environment variables in .bashrc has no effect on Apache! Read the Phusion Passenger manual to learn how environment variables actually work, and how to properly set them in Apache. Note that the manual assumes you're using Passenger 4 so the instructions may not work until you've upgraded.

Hongli
  • 18,682
  • 15
  • 79
  • 107
0

The issue was in .htaccess file in the public folder.

<IfModule mod_passenger.c>
 Options -MultiViews
 PassengerResolveSymlinksInDocumentRoot on
 #Set this to whatever environment you'll be running in
 RailsEnv production
 RackBaseURI /
 SetEnv GEM_HOME /home1/examplec/ruby/gems
 SetEnv GEM_HOME /home5/engeebe1/ruby/gems
 </IfModule>

SetEnv GEM_HOME /home1/examplec/ruby/gems was commented out initially, which after uncommenting, the app started working.

I guess Hongli below was correct as the error was in Phusion-passenger configuration.

JstRoRR
  • 3,693
  • 2
  • 19
  • 20