Skip to content

Instantly share code, notes, and snippets.

@gerarldlee
Last active February 25, 2017 04:15
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 gerarldlee/1049ebd9fb0971fb82592bb43e4fc6f9 to your computer and use it in GitHub Desktop.
Save gerarldlee/1049ebd9fb0971fb82592bb43e4fc6f9 to your computer and use it in GitHub Desktop.
Install dependencies
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
NOTE for nodejs dependency, you can omit it if its already installed on your home directory (which is a better alternative than installing Node on root directory)
Installing Node on home directory requires Linuxbrew
Using rbenv:
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.4.0
rbenv global 2.4.0
ruby -v
gem install bundler
rbenv rehash
gem install rails --v 5.0.1
rbenv rehash
Reference:
https://gorails.com/setup/ubuntu/16.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment