Not rolling with Ruby on Rails (yet)

Ahhhh, problems problems. I rashly installed Rails 2.0 thinking such an excitable dev community would have produced a raft of useful tutorials in the three months since its release… alas, no. The ‘standard’ tutorials all still seem to be about 1.2.x, and various incompatibilities mean they just fall over when you try them out in 2.0. The collective wisdom of the web at the moment seems to be to learn in 1.2.x, then upgrade to 2.0 when you know what you’re doing! So I’ll shortly be doing that, and probably will return here to give it a go.

In the meantime, there are a few intros to Rails 2.0, but even they seem to suffer from minor differences between 2.0.1 and 2.0.2. I’m working my way through this one, and have learned one thing so far, that the default database is now SQLite, when previous versions used mySql. To force a new rails app (say, ‘exchange’) to set itself up for mySql, instead of doing this:

rails exchange

Do this instead:

rails -d mysql exchange

Your <appname>\config\database.yml will now be set up for mySql.

Update: this mysql setup is actually mentioned at the start of Part 2, very handy but a little too late for my liking!

Another point to note, if you’re using Instant Rails on Windows, is that the apps are best tested using the ruby script/server command suggested by the tutorial not the ‘Start with Mongrel’ button in Instant Rails. Trying the latter will throw a few ‘missing library’ errors when you try to run the app.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: