13 August 2009

On the Rails

So, I thought I'd have a go at being all modern, I thought I'd try playing with Ruby and Rails, I'm following a book, and it looks like it ought to be really simple - it's not quite as simple as they say though, the book says that all I need to to is install Ruby then use ruby to install Rails, but actually to get something working you need to install Ruby, install Rails, Install the sqLite ruby support and download sqlite.
  • Install Ruby
  • gem install rails
  • gem install sqlite3-ruby
  • Download sqlite3.dll and copy it into the Ruby bin directory
This worked for me, at least - then create and serve a rails project with a welcome page:
  • rails projectname
  • cd projectname
  • start ruby script/server
  • ruby script/generate controller Welcome
  • edit config/routes.rb to comment out the existing map.connect lines and replace with

    map.root :controller => "welcome"

  • rake db:migrate
  • ren public cilbup to get rid of the public index.html - this could equally well become a deletion.

No comments: