Skip to content

Instantly share code, notes, and snippets.

@amoslanka
Created February 28, 2012 17:16
Show Gist options
  • Save amoslanka/1933773 to your computer and use it in GitHub Desktop.
Save amoslanka/1933773 to your computer and use it in GitHub Desktop.
Ruby on Rails on Ubuntu
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core curl mysql-server mysql-client
# 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
exec $SHELL
# INSTALL RUBY-BUILD
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
# INSTALL RUBY
rbenv install 1.9.2-p290
rbenv rehash
rbenv global 1.9.2-p290
ruby -v
# sudo mysqladmin -u root -h localhost password 'mypassword'
sudo apt-get install libmysql-ruby libmysqlclient-dev
# INSTALL NODE
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs nodejs-dev redis-server
# INSTALL NPM
curl http://npmjs.org/install.sh | sudo sh
cd /vagrant
gem install bundler
rbenv rehash
bundle install
# For now, this script only installs up to web server.
# TODO: unicorn, nginx
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment