Monday, January 31, 2011

Rails Sample App Status (part 3)

My new goal with getting a sample app up and running on my Ubuntu 10.04 vm is to use rails 3.0.3 and ruby version 1.9.2. I had trouble with zlib while installing gems, but found this bit of magic on the rvm site:

$ rvm package install zlib
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-zlib-dir=$rvm_path/usr

After that it was smooth sailing:

$ rvm use 1.9.2 --default
$ rvm use --create 1.9.2@rails
$ gem install sqlite3-ruby
$ gem install rails

After getting rvm, ruby and rails configured, I decide to try out the devise_example rails application using authentication.

This posed some issues with setup. The documented installation steps didn't quite work. When I executed 'bundle install' in the devise_example directory, the sqlite3 'gem' (which isn't really a gem), failed.

Seems you need this first:

$ sudo apt-get install libsqlite3-dev.

FYI, make sure you have your /etc/apt/apt.conf set up like this:

Acquire::http::proxy "http://user:pw@host.com:8080/"

But you knew that already, right?

A whole lot of issues when I tried to run 'rake devise:setup'. It was complaining about missing file openssl.h. OK, after poking around online I was able to see there were other folks who had a similar issue, but what worked for me was:

$ sudo apt-get install openssl
$ sudo apt-get install libssl-dev

After that, setup was able to finish.




Next comes the fun...trying out the devise_example.





No comments:

Post a Comment