"Could not spawn process for application" - Passenger or Bundler issue?

456 views
Skip to first unread message

PhillyMost

unread,
Jun 9, 2016, 11:47:02 AM6/9/16
to Phusion Passenger Discussions

Error ID: d75c4450

  Error details saved to: /tmp/passenger-error-K9M2hi.html

  Message from application: Your Ruby version is 1.9.3, but your Gemfile specified 2.3.1 (Bundler::RubyVersionMismatch)

  /usr/lib/ruby/vendor_ruby/bundler/definition.rb:361:in `validate_ruby!'

  /usr/lib/ruby/vendor_ruby/bundler.rb:116:in `setup'

  /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `<top (required)>'

  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'

  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'

  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'

  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'

  /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'

  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'

  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'

  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'



[ 2016-06-06 19:27:20.8586 7425/7f0220ebe700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The 

identifier of the error is d75c4450. Please see earlier logs for details about the error.



Ruby versions match but there seems to be some hang up that's keeping Phusion from loading the application. Does this look like a Phusion or Bundler issue? Nowhere in the app or server am I referencing version 1.9.3.


Stack:

Phusion Passenger 5.0.28
nginx version: nginx/1.10.0
Ubuntu 14.04: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
rbenv 1.0.0-21-g9fdce5d
Bundler version 1.12.5
Capistrano Version: 3.4.1 (Rake Version: 11.1.2)


Daniel Knoppel

unread,
Jun 10, 2016, 4:59:03 AM6/10/16
to Phusion Passenger Discussions
It reads like you have multiple versions of Ruby installed. You can specify which one you want Passenger to use for your app: https://www.phusionpassenger.com/library/config/reference/?a=passenger_ruby

- Daniel

PhillyMost

unread,
Jun 12, 2016, 1:55:08 PM6/12/16
to Phusion Passenger Discussions

Thanks for the reply. The nginx.conf file appears to indicate that it's pointing to the correct ruby installation but the error message indicates otherwise, if I'm looking at it correctly. Does it look off to you?


I installed ruby via rvm but decided in the end to use rbenv. I attempted to remove any reference to rvm because they apparently don't play well together. I could've missed something. Let me know if there's an "ah ha" moment there. Otherwise I may just blow out this instance and start over. 


Thanks.


/etc/nginx/nginx.conf

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;

passenger_ruby /home/deploy/.rbenv/shims/ruby; # If you use rbenv



/home/deploy/.rbenv/shims/ruby

#!/usr/bin/env bash

set -e

[ -n "$RBENV_DEBUG" ] && set -x


program="${0##*/}"

if [ "$program" = "ruby" ]; then

  for arg; do

    case "$arg" in

    -e* | -- ) break ;;

    */* )

      if [ -f "$arg" ]; then

        export RBENV_DIR="${arg%/*}"

        break

      fi

      ;;

    esac

  done

fi


export RBENV_ROOT="/home/deploy/.rbenv"


exec "/home/deploy/.rbenv/libexec/rbenv" exec "$program" "$@"

Daniel Knoppel

unread,
Jun 13, 2016, 6:44:44 AM6/13/16
to Phusion Passenger Discussions
passenger_ruby seems OK, but I can't say the nginx.conf is correct since you've cut away most of it (passenger_ruby can be specified multiple times).

Using rvm myself, I don't have much experience with rbenv, but did you verify that manually executing `/home/deploy/.rbenv/shims/ruby` gives you the correct ruby version and gem home etc.?

- Daniel
Reply all
Reply to author
Forward
0 new messages