I’m new to ruby On Rails, I’m running InstantRails on a Windows XP Pro.
SP2 machine. I’m rigorously following the book ‘Build Your Own Ruby On
Rails Web Applications’ by Patrick Lenz. I’ve reached ch4 without any
problem at all but on P101:
class Story < ActiveRecord::Base; end
=>nil #Works fine to here but then:
story = Story.new #This fails with the error:
Error: Unknown database ‘shovell_development’
plus a number of other ‘from’ lines.
I created the shovell_development database earlier exactly as the book
instructed & I’ve used the show command in mysql plus manually checking
the relevant folders so I know that the database is there. I know that
some sort of setting must be wrong but I can’t find out where, I’ve
edited the ‘database.yml’ in the shovell config file, that seems to be
OK, I’ve also added the system variable to my environment variables
Name: mysql Value: Drive:\path\to\mysql\bin
so I’ve now exhausted my possibilities. I can only think that there
must be some setting or other agent responsible for the problem because
otherwise how would ‘story = Story.new’ know to look for the
shovell_development’ database as the whole command block doesn’t refer
to it at all?
Any help greatly appreciated.