Skip to content

Instantly share code, notes, and snippets.

@joaofx
Last active August 29, 2015 14:09
Show Gist options
  • Save joaofx/2c9ecf21b6cd415532d4 to your computer and use it in GitHub Desktop.
Save joaofx/2c9ecf21b6cd415532d4 to your computer and use it in GitHub Desktop.
Commands to install ruby, node and rails in a new ubuntu machine

References

http://railsapps.github.io/installrubyonrails-ubuntu.html https://gorails.com/setup/ubuntu/14.10

Install/update dependencies

sudo apt-get update

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties

sudo apt-get install curl

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

Install node.js

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs

Install ruby

sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.3
rvm use 2.1.3 --default
ruby -v

Install rails

gem install rails

Install postgre rails client

sudo apt-get install libpq-dev

Install Sublime Text 3

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

Install postgres

apt-get update
sudo apt-get install postgresql postgresql-contrib

# change postgres password
sudo -u postgres psql postgres
\password postgres

# still using psql, create database:
create database DATABASE_NAME;

# quit psql
\q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment