2009-05-23

Playing with Ruby on rails on Windows

I have been playing with Rubymine which is a lovely development environment for Ruby.  I have a new web site development project so decided to learn Ruby on rails.

I have been reading Simply Rails 2 by Patrick Lenz and have now decided to actually try it out.  However the installation on Windows didn’t seem as straightforward as I thought it was going to be.  firstly the Instant rails seemed the wrong way to go as I already had ruby. So I did it by hand.

So I did gem install rails which worked fine.  Then downloaded rubymine and a 30 day free evaluation.  This then created my project for me.  So far so good.  I downloaded SQLite3 and put the .exe,.dll and .def in the Windows/ system32 directory, or rather I thought I did.   When I looked later Vista had prevented them.  So then I put them in c:\ruby\bin.

Had a bit of a problem with the SQL lite and I haven't been alone in this.  I created a data base with the SQL addin manager for Firefox.  Apart from using a .sqlite rather .sqlite3 that seemed ok. 

I had problems with installing the gem sqlite3-ruby and then I found this great post http://blog.emson.co.uk/2008/06/installing-sqlite3-on-windows-for-rails/

and it worked with gem install gem install sqlite3-ruby --version=1.2.3  and that seemed to work.

However ruby script/server still wouldn’t start up rails.  Time for supper.  The problem was I had corrupted the database.yaml file by adding a single character.  Once that was sorted it worked fine.

No comments: