Skip to content

Instantly share code, notes, and snippets.

@waloriju
Last active December 20, 2015 22:09
Show Gist options
  • Save waloriju/6202906 to your computer and use it in GitHub Desktop.
Save waloriju/6202906 to your computer and use it in GitHub Desktop.
Ubuntu install Ruby, Rails, Gems

Run: Ruby MRI, RVM, Ruby 2, Rails 4

curl -ks https://gist.github.com/WanderleyJunior/6202906/raw/run.sh | bash -
#!/bin/bash
sudo apt-get update
# Ruby MRI
sudo apt-get install -y build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
# RVM
curl -L https://get.rvm.io | bash -s stable
exec $SHELL -l
rvm requirements
# Rubies
rvm list known
# Ruby
rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/usr
# Gemset
rvm use 2.0.0@system --create --default
# Gem update
gem update --system
# gemrc
gem install whatever --no-ri --no-rdoc
# Rails
gem install rails --version 4.0.0
# MySQL
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev
gem install mysql2
# PostgreSQL 9.1
sudo apt-get install -y postgresql-9.1 postgresql-server-dev-9.1
gem install pg
# MongoDB
sudo apt-get install -y mongodb mongodb-dev
gem install mongo
# Redis
sudo apt-get install -y redis-server libhiredis-dev
gem install hiredis
# Memcache
sudo apt-get install -y memcached libmemcached-dev
gem install dalli
# Imagemagick
sudo apt-get install -y imagemagick libmagickwand-dev
gem install rmagick mini_magick
# rubygems-bundler && Noexec
gem install rubygems-bundler
#gem regenerate_binstubs
# Nodejs
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment