Skip to content

Instantly share code, notes, and snippets.

@vik-y
Forked from scmx/upgrade-install-ruby-2-1-2-ubuntu-12-04.md
Created November 21, 2015 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vik-y/dfb4cd1a8350b2713aa5 to your computer and use it in GitHub Desktop.
Save vik-y/dfb4cd1a8350b2713aa5 to your computer and use it in GitHub Desktop.
Upgrade/Install ruby 2.1.2 #ubuntu #12.04 #14.04
# Reference http://stackoverflow.com/a/18490935/2037928
# Login as root
# Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz
# Unpack
tar -xvzf ruby-2.2.0.tar.gz
cd ruby-2.2.0/
# Compile from source
./configure --prefix=/usr/local
make
make install
# Make sure deploy user has access to installing gems
chown -R deploy:staff /usr/local/bin
chown -R deploy:staff /usr/local/lib/ruby
# Login as deploy user
# Install bundler
gem install bundler
# Locally
cap production deploy
# Remove the old manifest.yml file
rm /u/apps/YOUR_APP_NAME/shared/assets/manifest.yml
# I also had to make the unicorn binary into a binstub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment