icemelon
icemelon

Reputation: 1711

Rails deployment with Phusion Passenger: An error occured while starting up the preloader. Could not find rake-10.3.2

error logs

[ 2014-06-17 17:38:57.4484 15500/7f214dcca700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /var/www/wherami.com/current#default: An error occured while starting up the preloader.
     in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:451)
     in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:562)
     in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:202)
     in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:746)
     in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:804)

<p>-------- The exception is as follows: -------</p>
Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)
<pre>  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/spec_set.rb:92:in `block in materialize&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/spec_set.rb:85:in `map!&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/spec_set.rb:85:in `materialize&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/definition.rb:133:in `specs&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/definition.rb:178:in `specs_for&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/definition.rb:167:in `requested_specs&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/environment.rb:18:in `requested_specs&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/runtime.rb:13:in `setup&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler.rb:120:in `setup&#39;
  /home/rails/.rvm/gems/ruby-2.0.0-p481/gems/bundler-1.6.3/lib/bundler/setup.rb:17:in `&lt;top (required)&gt;&#39;

I have followed the guide on phusion passenger wiki to reset the gemset, but the problem still exist.

Upvotes: 0

Views: 556

Answers (1)

beckr
beckr

Reputation: 41

Ran into this issue as well - processes spawned from within nginx using /usr/bin/env ruby were using the wrong Ruby version since its parent directory was missing from the PATH.

Adding the correct location to /etc/init.d/nginx solved this for me.

Upvotes: 1

Related Questions