Skip to content

Instantly share code, notes, and snippets.

@chriskk
Forked from olistik/gist:2627011
Last active December 17, 2015 11:39
Show Gist options
  • Save chriskk/5603529 to your computer and use it in GitHub Desktop.
Save chriskk/5603529 to your computer and use it in GitHub Desktop.

Ubuntu 12.10 setup (RVM, PostgreSQL)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim git curl
  • install the pre-requisites:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev 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 pkg-config
curl -L https://get.rvm.io | bash -s stable
exec $SHELL
rvm install 2.0.0-p195
rvm use 2.0.0 --default
ruby -v
  • Don't require rdoc and ri when installing gems:
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
  • Install the latest rails (3.2.12):
gem i rails

SSH key/Heroku configuration

ssh-keygen -t rsa
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
heroku login
heroku keys:add

Git/Github configuration

git config --global color.ui true
git config --global user.name "Christopher Kobayashi"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
cat ~/.ssh/id_rsa.pub | clipboard

System dependencies for peculiar gems

  • nokogiri: libxml2-dev libxslt1-dev
  • pg: postgresql libpq-dev
  • rails related: nodejs
  • mysql: mysql-server mysql-client libmysqlclient-dev
  • sqlite3: sqlite3 libsqlite3-dev
  • capybara-webkit: libqt4-dev g++
  • curb: libcurl4-gnutls-dev
  • rmagick: graphicsmagick-libmagick-dev-compat libmagickwand-dev
sudo -u postgres createuser chriskk
sudo -u postgres psql
postgres=# \password chriskk
postgres=# create database chriskk;
CREATE DATABASE
postgres=# grant all privileges on database chriskk to chriskk;
bundle exec rails dbconsole
# pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment