Monday, August 3, 2009

Ruby On Rails, a blind date

I'd heard of Ruby on Rails, or Rails, or ROR, depending on who you're talking to. I'd never used it, having literally bought my first web development book before ROR existed, and not even looked at THAT book until 2008. Needless to say, I'm behind the times. ROR, like PHP and Python, is a web development language. Its considered good enough by Herr Jobs to be included in Apple OS X, and is supposed to be a breeze. I have no experience with it, and all I will be talking about here is getting it working on OpenSolaris. These instructions are partially from this site.

First, install Ruby
#pkg install SUNWruby18
Gotta love the Solaris package names....
Next, apparently Rubygem is included, but its old. You can either do
#gem update --system
or you can download the source from here.
Then
#gzip -dc rubygems-1.3.5.tgz | tar xf -
#cd rubygems-1.3.5
#ruby setup.rb

Ruby gems is now installed! Next, install rails.
#gem install rails
This can take some time. I was ssh-ed in from a different site and was concerned it was broken/not working, but it finished it up. Next you can test it! Unfortunately, rails did not install into any of my path folders, so I had to manually locate it. Mine was located at:
/var/ruby/1.8/gem_home/bin/rails
Now you're all set! test it by making a site
#mkdir newsite
#cd newsite
#/var/ruby/1.8/gem_home/bin/rails demosite
#cd demosite/
#script/server

Then browse to http://:3000 and see if its there. Mine worked right away after locating the binary rails and running it. Good luck!

No comments:

Post a Comment