Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
sudo apt-get install xclip
echo "alias clipboard='xclip -sel clip'" >> ~/.bashrc
You can use rbenv OR RVM, they're mutually exclusive. Feel free to choose the one that fits your needs.
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
- Install the pre-requisites:
sudo apt-get install zlib1g-dev build-essential libssl-dev libreadline-dev
- Install the interpreter:
rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
ruby -v
- 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
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 bundler rails
Janus (vim)
sudo apt-get install curl
curl -Lo- http://bit.ly/janus-bootstrap | bash
git config --global color.ui true
git config --global user.name "Maurizio De Magnis"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
cat ~/.ssh/id_rsa.pub | clipboard
-
Add it to your GitHub ssh account page
-
Test if it works:
ssh -T [email protected]
- 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
PostgreSQL setup
sudo -u postgres createuser olistik
sudo -u postgres psql
postgres=# \password olistik
postgres=# create database myapp_development;
CREATE DATABASE
postgres=# grant all privileges on database myapp_development to olistik;
bundle exec rails dbconsole
# pass
cd
pwd # /home/olistik
mkdir projects
id # uid=1000,gid=1000,...
sudo echo "projects /home/olistik/projects vboxsf uid=1000,gid=1000,rw 0 0" >> /etc/fstab
sudo mount projects