Women in Technology

Hear us Roar



Article:
  Rolling with Ruby on Rails
Subject:   note of caution ....
Date:   2005-12-31 17:31:35
From:   jeffbr
for those of you setting up on a linux box with an existing mysql (possibly for windows users with existing mysql), it's well worth the trouble to add a new user and password to your mysql database for your rails stuff.


With a little DB admin, you can limit the account to your rails databases only. However a gotcha happened to me on linux.


Making new account 'rails_test' password '', then inserting those values into the config/database.yml yieled results for 'list' and 'edit', 'new' and 'show', but any 'secondary' action like 'saving' failed.


The error messages were quite cryptic, but it seems that a blank password doesn't necessarily work for linux mysql.


Solution: Craft a password with your new user, and be sure to put it in database.yml -- unfortunately this is plaintext in the database.yml. Idealily it would be hashed or something. Anyway, this will get you rolling if your running into permission problems running object.save.


Jeff B