Rajeev Kannav Sharma

Posts About

passenger 5.0.26 with nginx deployment fix

02 Apr 2016

We’re using passenger and nginx combo for our Rails application at production environment. After upgrading passenger to 5.0.26, We’re seeing errors from passenger about building the native support so file.

App 14490 stderr:  [passenger_native_support.so] trying to compile for the current user
(deploy) and Ruby interpreter...
App 14490 stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 14490 stderr:      Warning: compilation didn't succeed. To learn why, read this file:
App 14490 stderr:      /tmp/passenger_native_support-%@$#^^.log
App 14490 stderr:  [passenger_native_support.so] not downloading because passenger wasn't
installed from a release package
App 14490 stderr:  [passenger_native_support.so] will not be used (can't compile or download)
App 14490 stderr:   --> Passenger will still operate normally.

In the /tmp/passenger_native_support-%@$#^^.log file log, the error looks like:

# mkdir -p /usr/lib/buildout/ruby/ruby-version-linux
Encountered permission error, trying a different directory...
# mkdir -p /home/deploy/.passenger/native_support/5.0.26/ruby-version-linux
# cd /home/deploy/.passenger/native_support/5.0.26/ruby-version-linux
# /usr/bin/ruby-version /usr/lib/src/ruby_native_extension/extconf.rb
/usr/bin/ruby-version: No such file or directory -- /usr/lib/src/ruby_native_extension/extconf.rb (LoadError)

In short, ruby_native_extension isn’t the correct folder, but as a temporary fix to get the compilation going you could just copy the necessary files there anyway, e.g.:

sudo mkdir /usr/lib/src/        
cp -dpR /usr/share/passenger-enterprise/ruby_extension_source /usr/lib/src/ruby_native_extension

We moved our machine to Unicorn as we’ve scope to migrate till now.

And if you get stuck… Ask Here

email me rajeevsharma86@gmail.com

Tweet to me at @rajeevkannav.