POSTS

A Beginner Again: Rails 4.0 + Ruby 2.0 on Ubuntu VPS

Blog

I’ve been programming Rails for a while now, and with the major releases I feel like I’m back to square one. There’s new gotchas, new strangeness talking to the databse, etc. As I encounter strangeness, I’m documenting it here.

I started by installing rbenv and Ruby 2.0. I then followed this Stack Overflow post on how to install edge Rails. I really like this approach because it makes use of Git submodules.

Things after I got Edge rails installed, I then set up my Gemfile. I don’t want CoffeeScript so I handled that by commenting out its line in the Gemfile.

I installed Postgres via apt and that went swimmingly. I was suposed to merely configure the config/databases.yml file and then rake db:create my way to happiness. Here’s where the pain appeared. I kept encountering an error like: FATAL: Peer authentication failed for user.

Fortunately Stephen Goss at Delicious Robots Blog had the solution: reconfigure pg_hba.conf. With that I was able to execute rake db:create and see my databases. I’m planning on following Michael Hartl’s excellent tutorial mostly as a means to make sure that I step through many of the new ways of doing things.

I’m planning on blogging any other snags I find along the way, but that Postgres one was a real nasty one.