Skip to content

Instantly share code, notes, and snippets.

@bokuo-okubo
Last active December 13, 2016 08:51
Show Gist options
  • Save bokuo-okubo/2cf3e7eecd3b31c74ca54a3d653f97d4 to your computer and use it in GitHub Desktop.
Save bokuo-okubo/2cf3e7eecd3b31c74ca54a3d653f97d4 to your computer and use it in GitHub Desktop.
create rails env
#!/bin/bash
sudo apt-get update -y
# Install the rbenv and Ruby dependencies with apt-get:
sudo apt-get install -y 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
#!/bin/bash
# install rbenv
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
#!/bin/bash
# install ruby
source ~/.bashrc
sudo apt-get --purge remove ruby -y
rbenv install 2.3.3
rbenv rehash
rbenv global 2.3.3
gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment