Created
November 13, 2010 17:26
-
-
Save rgo/675499 to your computer and use it in GitHub Desktop.
Script to install rails stack in a ubuntu system (or debian based)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install vim with ruby support | |
sudo aptitude install vim-gnome | |
# Install things to compile | |
sudo aptitude install bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev | |
# Database stuff | |
sudo aptitude install sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client libmysqlclient-dev | |
# Utilities needed by plugins, rvm,... | |
sudo aptitude install curl wget ack-grep exuberant-ctags markdown gitg git-core | |
# Rvm installation (Anyway you can read http://rvm.beginrescueend.com/) | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
# Rvm configuration | |
echo 'if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi' \ | |
>> ~/.bashrc | |
echo '[[ -r $rvm_path/scripts/completion ]] && source $rvm_path/scripts/completion' \ | |
>> ~/.bashrc # rvm autocompletion | |
echo 'rvm_project_rvmrc_default=1' \ | |
> ~/.rvmrc # Use default gemset when leaving a .rvmrc project dir | |
# rvm with openssl support | |
rvm package install openssl | |
# Setup global gems for all ruby versions | |
echo -e 'bundler | |
mysql | |
rake' > ~/.rvm/gemsets/global.gems | |
# Setup your .gemrc | |
echo -e '--- | |
benchmark: false | |
gem: --no-ri --no-rdoc | |
update_sources: true | |
bulk_threshold: 1000 | |
verbose: true | |
sources: | |
- http://rubygems.org | |
- http://gems.github.com | |
backtrace: false' > ~/.gemrc | |
# Install Ruby 1.8.7 | |
rvm install 1.8.7 -C --enable-shared=yes | |
# [OPTIONAL] Install Ruby 1.9.2 | |
# rvm install 1.9.2-head | |
# Set default Ruby interpreter | |
rvm --default use 1.8.7 | |
# Install Rails gems | |
gem install rails | |
# Install sqlite3 driver for pet-projects | |
gem install sqlite3-ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment