This documentation website doesn’t support Internet Explorer. Please visit our old documentation to find what you’re looking for.
Migrating from Passenger 4 to 5
Relevant selection for this article:
Passenger 5 comes with many major improvements and is mostly compatible with Passenger 4. This section highlights important and incompatible changes.
APT repository changed to 5.0
Our main APT repository switched to Passenger 5. If there is a pressing need to remain on Passenger 4, use the legacy Passenger 4 APT repository.
Minimum Rails version: 2.3
We've dropped support for Rails version older than 2.3.
To make Rails 2.3 apps work with Passenger 5, the app must have a
config.ru file. For example:
# Require your environment file to bootstrap Rails require ::File.dirname(__FILE__) + '/config/environment' # Serve static assets from RAILS_ROOT/public directory # use Rails::Rack::Static # Dispatch the request run ActionController::Dispatcher.new
Restart mechanism changed
restart.txt to restart the app is still supported, but with the new default settings, Passenger won't notice any changes until after max 10 seconds. We recommend using the
passenger-config restart-app command.
Feature and configuration changes
- If you use out-of-band garbage collection, beware that the
X-Passenger-Request-OOB-Workheader has now been renamed to
- When using Rack's full socket hijacking, you must now output an HTTP status line.
- The Nginx configuration template has changed. Users are encouraged to update it.
passenger-standalone.jsonhas been renamed to
Passengerfile.jsonno longer overrides command line options. Instead, command line options now have the highest priority.