Created
April 26, 2014 19:07
-
-
Save danman01/11328278 to your computer and use it in GitHub Desktop.
passenger upgrade ruby debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ssh into the server and: | |
| rvm get stable | |
| rvm get head | |
| rvm install ruby-version-that-you-want | |
| rvm gemset use rubyversion@gemset --create | |
| #locally: | |
| #update local version | |
| bundle install | |
| #capfile is set to pull from local version when deploying | |
| cap deploy | |
| #fail? Likely... | |
| #back on the server: | |
| #recompile passenger with nginx: | |
| #http://www.modrails.com/documentation/Users%20guide%20Nginx.html#rubygems_generic_install | |
| #-first make a backup of your nginx dir | |
| #grab the latest passenger gem: | |
| gem install passenger | |
| #install the passenger nginx module which recompiles and works with your ruby and gemset: | |
| sudo su | |
| passenger-install-nginx-module | |
| #replace the blob of virtual server output at the end in the nginx.conf file | |
| #verify it’s running: | |
| passenger-memory-stats | |
| deploy again. Maybe restart nginx and touch passenger. Make sure you haven't hardcoded any strings containing old ruby version. | |
| profit! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment