Upgrading Passenger
Moonshine will install the passenger version that you specific in the manifest file on first time deploy. To take advantage of performance and security fixes of newer versions of Passenger you need to know how to upgrade passenger using Moonshine.
In this chapter we will discuss how to upgrading from Passenger 4.0.60 to 5.0.25. The process is the same if you want to upgrade to any version.
Steps
Step 1
In passenger.rb, within Moonshine::Manifest::Rails::Passenger module, change the passenger version:
BLESSED_VERSION = '5.0.25'
Step 2
Add the following Capistrano 2 task to deploy.rb:
namespace :deploy do
task :restart, :roles => :app, :except => { :no_release => true } do
sudo "passenger-config restart-app --ignore-app-not-running /srv//current"
end
end
Checkin the code changes to git and deploy the app using Capistrano.
Step 3
On the server, verify the installed version:
passenger-config --version
This upgrade improved the performance of RubyPlus
Page Load Time
| Passenger Version | Page Load Time |
|---|---|
| 4.0.60 | 2.4 s |
| 5.0.25 | 1.7 s |
Summary
In this chapter, you learned how to upgrade the passenger version using Moonshine.
Resource
Moonshine Support for Passenger 5 : Learn how to restart passenger 5 using Capistrano 2.x.