Skip to content

Instantly share code, notes, and snippets.

Created May 29, 2012 00:50
Show Gist options
  • Save caseywatts/2821935 to your computer and use it in GitHub Desktop.
Save caseywatts/2821935 to your computer and use it in GitHub Desktop.
Bash Script for Ubuntu RoR Setup - STC Summer 2012
# This probably won't run as a script, but you can copy sections at a time.
# Before running, change CAPITAL LETTERS to the appropriate variables you have
#When you get stuck on installation for "ttf-mscorefonts-installer", press [Tab] then [Return] to accept the agreement.
sudo apt-get update
sudo apt-get install mysql-server mysql-client
sudo apt-get install libmysql-ruby libmysqlclient-dev
sudo apt-get install build-essential mysql-server gedit-plugins ri phpmyadmin msttcorefonts openjdk-6-jdk git-core
sudo apt-get install sqlite3 libsqlite3-dev libsqlite3-ruby
sudo apt-get install rubygems
sudo apt-get install imagemagick
sudo apt-get install libssl-dev
#Install Nokogiri dependencies, as described on
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby
sudo apt-get install libxslt-dev libxml2-dev
#Install rbenv
cd ~
git clone git:// .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
#Install ruby in rbenv
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://
rbenv install 1.9.2-p290
#Set up git
git config --global "YOUR NAME HERE"
# Sets the default name for git to use when you commit
git config --global "YOUREMAIL@EMAIL.COM"
# Sets the default email for git to use when you commit
git config --global credential.helper cache
# Set git to use the credential memory cache
git config --global credential.helper 'cache --timeout=3600'
# Set the cache to timeout after 1 hour (setting is in seconds)
#Connect to STC Reservations
mkdir ~/code
cd ~/code
git clone
cd reservations
#Install Rails
gem install rails
#Install Bundler
#don't everr do "sudo gem install bundler"
gem install bundler
exec $SHELL
#for some reason paperclip doesnt like to be bundler installed?
gem install paperclip
cd ~/code/reservations
bundle install
#Connect reservations to your database
cd ~/code/reservations
cp config/database.yml.example config/database.yml
#open in your text editor, and configure it for your system
gedit config/database.yml
#Run Migrations and Start Server
rake db:create
rake db:migrate
rails server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment