My Journey on Rails

So i want to learn Rails. The best way seems to be from a VM with it preinstalled. So I installed VMWare player and got a Rails 2.0 image from bitnami. This installs on the laptop so I can bring to the mother in law’s house to play.

THe bitnami comes up with a network error. I check the network config on the player – good thing I use VMWare Workstation at work.

A browse to http://localhost does not work. A browse to http://192.168.163.128/ shows the bitnami startup page. Good. http://192.168.163.128/phpmyadmin cannot be run from an IP OTHER than 127.0.0.1. Annoying, but could be fixed if I had to.

So where is rails? A little find and all the bitnami stuff is installed in /opt/bitnami/ruby. They also install svn, git, mysql, everything.

The SitePoint Rails 2 PDF I bought for cheap over Xmas specifies the “Ruby console”. this is on Windows, looks like it sets a bunch of environments. I assume bitnami did it for me.

SO, in the home dir, run “rails shovell” to create scaffolding for the demo Shovell app (like Digg, get it?).

And BAM there we are. Just like in the book.

Start the server: “ruby script/server”.

It boots Mongrel, the preferred server (according to the book.) Running on http://0.0.0.0. Hmm. As I recall this is a proxy for the real IP, so I hit http://192.168.163.128:3000. POW! The Rails page comes up.

I click the “About your application’s environment” link. The thing abends. I am not so sure now. It may just be something stupid, but maybe it will cause other problems.

Onward. Now I need to type some SQL to create a new table. Copy, Paste the SQL into the console, done? No.

VMWare Workstation does this. Not VMWare player. If I can open an SSH putty session into the VM, THAT will work. But what a pain? How about Sun’s Virtual Box software? Does that support bitnami? Does it allow Paste?

Sure. Install VirtualBox, now try to get rails running in it. Run into a series of problems. Finally give up on the Bitnami appliance – SUSE does not have the online repositories, or the other support Ubuntu has, and I can use the GUI if I have to. So Download the Ubuntu 9.10 ISO, mount, install. Add git, other stuff. Try several googles worth of how to install Rails. Always problems. Try the Bitnami installer. Issues errors in replacing the git symlinks, and the Apache startup fails. Grrr.

Finally look at the book. Lenz has a sequence for Linux, and it works great. Some downloads, some building. Works. Now add the VirtualBox client stuff to allow clipboard operations. Doesn’t work. Finally read the message – reboot the host machine. Now clipboard works, mouse passes over window boundary without hitting Right-Ctrl. Nice.

So after 10 hours of dead ends, here I am actually working on Rails.

Leave a Reply