phusion / passenger

A fast and robust web server and application server for Ruby, Python and Node.js
https://www.phusionpassenger.com/
MIT License
5k stars 547 forks source link

Passenger Spawn Process Fails With Active Admin #1752

Closed gmahajan31 closed 8 years ago

gmahajan31 commented 8 years ago

I am trying to use passenger with nginx to start my Rails app but it seems to give an error about not able to spawn process. This seems to be happening with activeadmin.

Here is my gemfile

source 'https://rubygems.org' ruby '2.1.5'

gem 'rails', '4.2.5' gem 'responders', '~> 2.1.1' gem 'inherited_resources', '~> 1.6.0' gem 'activeadmin', '~> 1.0.0.pre2' gem 'rack-timeout', '~> 0.0.4' gem 'pg', '0.18.1' gem 'jquery-rails', '4.1.0'

gem 'simple_form', '~> 3.2.1' gem 'nested_form', '0.3.1' gem 'remotipart', '~> 1.2' gem 'client_side_validations', '~> 4.2.0' gem 'client_side_validations-simple_form', '3.2.1' gem 'responds_to_parent'

gem 'devise', '~> 3.5.2' gem 'devise_invitable', '1.5.2' gem 'virtus', '~> 0.5.3' gem 'high_voltage', '1.2.1' gem 'draper', '2.1.0'

gem 'acts_as_list', '~> 0.3.0' gem "paranoia", "~> 2.1.5" gem 'pg_search', '~> 0.6.4' gem 'aasm' gem 'transitions', '0.1.8', :require => ['transitions', 'active_model/transitions']

gem 'carrierwave', '0.9.0' gem 'fog', '1.19.0' gem 'unf' # fog optional dependency for proper char encoding

gem 'griddler', '~> 0.6.3'

gem 'activerecord-import', git: 'https://github.com/zdennis/activerecord-import' gem 'wkhtmltopdf-binary', '~> 0.9.9.1' gem 'pdfkit', '~> 0.5.4'

gem 'delayed_job_active_record' gem 'memcachier' gem 'dalli'

gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby' gem 'will_paginate', '~> 3.0.6' gem 'sass-rails', '~> 5.0.4' gem 'coffee-rails', '~> 4.1.1' gem 'uglifier', '>= 1.0.3' gem 'cancancan', '~> 1.10' gem 'awesome_print', git: 'https://github.com/michaeldv/awesome_print', branch: 'v2'

group :development, :test do gem 'byebug', '~> 8.2.0' gem 'launchy', '2.2.0' gem 'pry-byebug', '~> 3.3.0' gem 'pry-rails' gem 'brakeman', '~> 3.1.5' gem 'pry-remote' gem 'factory_girl_rails', '~> 4.4.0' gem 'binding_of_caller', '~> 0.7.2' gem 'capistrano', require: false gem 'capistrano-rails', require: false gem 'capistrano-bundler', require: false end

group :test do gem 'rspec-rails' gem 'capybara', '~> 2.2.1' gem 'shoulda-matchers', '~> 2.8.0' gem 'shoulda-callback-matchers', '~> 1.1.1' gem 'poltergeist', '1.1.0' gem 'faye-websocket', '0.4.7' gem 'simplecov', '0.7.1', require: false gem 'fivemat' gem 'database_cleaner' gem 'codeclimate-test-reporter', require: nil end

group :development do gem 'hirb' gem 'quiet_assets' gem 'letter_opener' gem 'sandi_meter' gem 'better_errors' gem 'rack-mini-profiler' gem 'traceroute' gem 'rails_best_practices' gem 'bullet', '~> 4.14.10' end

group :production, :prep, :staging do gem 'rails_12factor', '~> 0.0.3' gem 'newrelic_rpm', '~> 3.9.6.257' gem 'exception_notification', '~> 4.1.1' end

Here is the copy of the logs about the error: App 2451 stdout: App 2451 stderr: sh: 1: App 2451 stderr: env: not found App 2451 stderr: App 2451 stdout: [ 2016-02-19 10:59:01.3157 1757/7fd56a7ac700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/accusure/current: An error occurred while starting up the preloader. Error ID: dbccc9bb Error details saved to: /tmp/passenger-error-So10KP.html Message from application: There was an error while trying to load the gem 'activeadmin'. (Bundler::GemRequireError) /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in rescue in block (2 levels) in require' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:inblock (2 levels) in require' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in each' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:inblock in require' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in each' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:inrequire' /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in require' /var/www/accusure/releases/20160219092312/config/application.rb:5:in<top (required)>' /var/www/accusure/releases/20160219092312/config/environment.rb:2:in require' /var/www/accusure/releases/20160219092312/config/environment.rb:2:in<top (required)>' config.ru:1:in require' config.ru:1:inblock in

' /var/www/accusure/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in instance_eval' /var/www/accusure/shared/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:ininitialize' config.ru:1:in new' config.ru:1:in
' /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in eval' /usr/share/passenger/helper-scripts/rack-preloader.rb:110:inpreload_app' /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in <module:App>' /usr/share/passenger/helper-scripts/rack-preloader.rb:30:inmodule:PhusionPassenger' /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `
'

[ 2016-02-19 10:59:01.3201 1757/7fd56b7ae700 age/Cor/Con/CheckoutSession.cpp:277 ]: [Client 1-15] Cannot checkout session because a spawning error occurred. The identifier of the error is dbccc9bb. Please see earlier logs for details about the error.

I am using rails 4.2.5 ruby 2.1.5 activeadmin 1.0.0.pre2 Phusion Passenger 5.0.24 nginx version: nginx/1.8.1

FooBarWidget commented 8 years ago

This looks like an issue in Bundler. It raises Bundler::GemRequireError but it fails to report the original error that caused it.

OnixGH commented 8 years ago

This is the relevant bundler issue. You should upgrade or downgrade to a version of Bundler without that issue to see why your application didn't spawn. The current report doesn't show any sign of a Passenger issue, so closing for now.