Skip to content

Instantly share code, notes, and snippets.

@zfz
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save zfz/e4a1a1bdab17f7f640b6 to your computer and use it in GitHub Desktop.

Select an option

Save zfz/e4a1a1bdab17f7f640b6 to your computer and use it in GitHub Desktop.
rails env install script on vagrant ubuntu
sudo apt-get update
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 software-properties-common nodejs
# Install rbenv
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
exec $SHELL
# Install ruby
$HOME/.rbenv/bin/rbenv install 2.1.2
$HOME/.rbenv/bin/rbenv global 2.1.2
# No docs
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
# For rbenv
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
exec $SHELL
# Install rails
$HOME/.rbenv/shims/gem install rails -v 4.1.2
$HOME/.rbenv/bin/rbenv rehash
# Install ctags for vim
sudo apt-get install exuberant-ctags
# For gem paperclip
sudo apt-get install imagemagick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment