Skip to content

Instantly share code, notes, and snippets.

@harshalbhakta
Last active April 25, 2016 07:30
Show Gist options
  • Select an option

  • Save harshalbhakta/5b9ac93e26ba3e8be27d to your computer and use it in GitHub Desktop.

Select an option

Save harshalbhakta/5b9ac93e26ba3e8be27d to your computer and use it in GitHub Desktop.
Setup Ubuntu for Rails development.
  1. Activate workspace and set show the menus in title bar.
  2. Run software updater.
  3. Install Chrome.
  4. Install Sublime Text 3.
  5. Install Dropbox.
  6. Install Gimp.
  7. Install VLC.
  8. Install pgAdmin.
  9. Install Git Cola from Ubuntu Software Center.
  10. Install Kdiff3 from Ubuntu Software Center.
  11. Download private+public key from Google Drive to ~/.ssh, ~/.aws & ~/gnupg.
  12. https://rishicodes.wordpress.com/2015/12/12/transforming-ubuntu-into-a-heaven/

Install Git

$ sudo apt-get install git

Install development libraries

$ sudo apt-get update

# Required for rbenv install 2.1.0
$ sudo apt-get install libssl-dev

# Required for PostgreSQL
$ sudo apt-get install postgresql postgresql-contrib

# Required for RMagick
$ sudo apt-get install imagemagick libmagickwand-dev

# If you get an error 'Can't find Magick-config' while installing RMagick add below line to ~/.bashrc
export PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"

# Required for gem install pg
$ sudo apt-get install libpq-dev

# Required for gem install therubyracer
$ sudo apt-get install build-essential

Install rbenv

https://github.com/sstephenson/rbenv#installation

Install ruby 2.1.0

https://github.com/sstephenson/rbenv#installing-ruby-versions

Install rails 4.0.3

$ gem install rails --version 4.0.3

Install Postgresql

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04

# Create a new user.
$ sudo -u postgres createuser --createdb --pwprompt iwadmin --superuser

# Allow md5 authentication
$ sudo nano /etc/postgresql/9.3/main/pg_hba.conf

local   all             postgres                                peer
local   all             all                                     peer

# Should be

local   all             postgres                                trust
local   all             all                                     trust

$ sudo service postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment