Jez Higgins

Freelance software grandad
software created
extended or repaired


Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed

Installing Ruby and Rails on Ubuntu 14.04

This is mainly for my own benefit, because bootstrapping a Rails installation is such a collosal faff.

Prepare yourself
Make a cup of tea.  This could take a while.
Install Ruby
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev
 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties

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

git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 2.1.2
rbenv global 2.1.2
ruby -v

echo "gem: --no-ri --no-rdoc" > ~/.gemrc
Install Rails
sudo apt-get install nodejs

gem install rails
rbenv rehash
rails -v
gem install bundler
Install Postgres
sudo apt-get install postgresql libpq-dev
sudo su - postgres
createuser [me]
createdb -O [me] [whatevs]_development
createdb -O [me] [whatevs]_test
exit
Setup Rails Application
git clone [application]
cd [app_dir]
rbenv local 2.1.2
bundle install
rake db:migrate RAILS_ENV=development
rails server

Tagged ubuntu, ruby, and rails


Jez Higgins

Freelance software grandad
software created
extended or repaired

Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations

Hire me
Contact

Older posts are available in the archive or through tags.

Feed