addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Can't get passenger/nginx to work

From: Jon S.
Sent on: Saturday, April 26, 2014 11:16 PM
Anyone have experience with passenger? I've spent several trying to get
things running and am unable to do so.  This is a site that was running,
I updated the rails app (it starts without Passenger), but now I'm
getting the error:

Cannot spawn application '/var/www/xxx': Could not read from the spawn
server: Connection reset by peer (104)

The nginx error log shows:

# mkdir
-p /home/xxx/.rvm/gems/­ruby-1.9.3-p545@atav­entures/gems/passeng­er[masked]/ext/ruby/­ruby-1.9.3-x86_64-li­nux
cd /home/xxx/.rvm/gems/­ruby-1.9.3-p545@atav­entures/gems/passeng­er[masked]/ext/ruby/­ruby-1.9.3-x86_64-li­nux
Unable to locate the RVM path. Your RVM installation is probably too
old. Please update it with 'rvm get head && rvm reload && rvm repair

I've done all that to no avail.

The site is on DreamHost <ugh!> and so I have an admin account that can
do sudo stuff, but the webapp account isn't admin so I cannot easily
re-run the passenger-install-ng­inx-module which I thought might be the
way to get around this. nginx is up and running, though, so I'm not
convinced I need to do this.

I've followed a number of google posts (boy are there a LOT of Passenger
problems out there) and done things like creating a
config/setup_load_pa­ths.rb file which looks like this:

if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].­include?('rvm')
    rvm_path = File.dirname(File.di­rname(ENV['MY_RUBY_H­OME']))
    rvm_lib_path = File.join(rvm_path, 'lib')
    $LOAD_PATH.unshift rvm_lib_path
    require 'rvm'
    RVM.use_from_path! File.dirname(File.di­rname(__FILE__))
  rescue LoadError
    raise "RVM ruby lib is currently unavailable."
# This assumes Bundler 1.0+
ENV['BUNDLE_GEMFILE'­] = File.expand_path('..­/Gemfile',
require 'bundler/setup'

but that didn't do it. Can't tell you how much I appreciate services
like Heroku and Ninefold!

Any suggestions would be greatly appreciated


People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy