3

I switched from 2.2.5 to 2.1.5 recently and noticed that I get an attempt to compile and download the interpreter as such:

[ 2015-10-25 11:15:15.3328 8841/b6ad5b40 age/Cor/CoreMain.cpp:793 ]: Disconnecting long-running connections for process 16579, application /var/apps/app/public (production)
App 17117 stdout:
App 17117 stderr:  --> Compiling passenger_native_support.so for the current Ruby interpreter...
App 17117 stderr:
App 17117 stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 17117 stderr:
App 17117 stderr:  --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter...
App 17117 stderr:
App 17117 stderr:      (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 17117 stderr:
App 17117 stderr:      Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.20/rubyext-ruby-2.1.5-x86-linux.tar.gz: The requested URL returned error: 404 Not Found
App 17117 stderr:      Trying next mirror...
App 17117 stderr:      Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.20/rubyext-ruby-2.1.5-x86-linux.tar.gz: The requested URL returned error: 403 Forbidden
App 17117 stderr:  --> Continuing without passenger_native_support.so.
App 17140 stdout:

It seems to have no issues after this (spawns normally), but I was wondering what's the proper way to recompile this without starting fresh so I can address this issue? Any help would be very much appreciated! Running nginx + passenger w/ rbenv.

Basically I was wondering what the correct steps of switching passenger from using one version of ruby to another after an installation with passenger-install-nginx-module using all the defaults on Debian.

Cenoc
  • 197
  • 12

1 Answers1

0

If you plan to change your ruby version, I strongly recommend a tool like rvm or (I prefer this one) rbenv

After the setup and ruby install, to switch ruby version it's just a matter of tuning the default ruby in the passenger module configuration.

/etc/apache2 $ cat mods-enabled/passenger.conf 
### Begin automatically installed Phusion Passenger config snippet  ###
<IfModule mod_passenger.c>
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  #  PassengerDefaultRuby /usr/bin/passenger_free_ruby
  PassengerDefaultRuby /home/me/.rbenv/shims/ruby
</IfModule>
### End automatically installed Phusion Passenger config snippet ###

If you use rbenv either you set and ENVvariable for the exact ruby version or include a .ruby-version file in the root of your project.

473183469
  • 1,350
  • 1
  • 12
  • 23