Skip to content

Building a Ubuntu 12.04 LTS Dev VM

Nicholas Martin edited this page Feb 24, 2014 · 19 revisions

Installing Ubuntu on a VM

  1. Install VirtualBox.
  2. Download the Ubuntu 12.04 LTS (x64) iso.
  3. Create a Ubuntu (x64) VM with the iso mounted. It can be mounted from storage.
  4. Boot the VM. It may take a bit to get going.
  5. Go through the Ubuntu installation. Don't install the updates or 3rd party additions.
  6. Install the 3rd party guest additions.
  7. Restart. You should be able to have a decent resolution now.

Install Ruby

You want RVM to do this, period. Watercooler currently runs Ruby 2.0.

  1. Install curl. sudo apt-get install curl
  2. Make the terminal work as a real login shell. See here.
  3. Install RVM. \curl -sSL https://get.rvm.io | bash -s stable
  4. Make RVM a thing. source ~/.bashrc
  5. Install our specific version of Ruby. rvm install ruby-2.0.0-p353

You may need to enter your password a few times.

Install Postgres

We need postgres in order to install some of our gems later. It MUST be at least version 9.2

  1. Install postgresql 9.2. sudo add-apt-repository ppa:pitti/postgresql then sudo apt-get update then sudo apt-get install postgresql-9.2
  2. Login as the postgres user. sudo su - postgres
  3. Create a user/role for yourself. createuser. Use your username for the role, and make it a superuser.
  4. Make empty databases for development and test. createdb watercooler and createdb watercooler-test.
  5. Install the development libraries. sudo apt-get install libpq-dev
  6. Edit /etc/postgresql/9.2/main/pg_hba.conf. Change references to md5 to trust.
  7. Reload postgres. sudo su - postgres then /usr/lib/postgresql/9.2/bin/pg_ctl reload -D /var/lib/postgresql/9.2/main.
  8. Stop being the postgres user. logout

Install git and clone the project

  1. Install git. sudo apt-get install git
  2. You need to make a new ssh key and add it to your github profile. See Generating SSH Keys

Getting Rails operational

  1. Install rubygems. sudo apt-get install rubygems
  2. Install bundler with rubygems. `sudo gem install bundler'
  3. Install Rails plus all of our other dependencies with bundler. bundle install as we have quite a few gems at this point, it will take a bit.
  4. rails s should not start appropriately, and visiting localhost:3000 in a browser should show the watercooler homepage.

YAY YOU DID IT! 👍

Clone this wiki locally