Hi,
Im using a macbook and Im still trying to get rails running properly! I've went through the basic locomotive help file and have no problems up until 'Prepare your database tables'. Here is what im trying to do:
"Prepare your database tables
We will prepare our database using Migrations. Using migrations, you code your table schemas in ruby. The migrations system is set up to facilitate the evolution (and devolution!) of your schema over time (versions/features/etc.).
Select your application in the Locomotive main window and choose Applications > Open Terminal On the command line in the terminal type: ruby script/generate migration add_monkeys_table
(The name you choose for your migration is not all that important to rails; it should not include spaces and it should be meaningful to you). Open the newly created '001_add_monkeys_table.rb' in db/migrate in your favorite text editor. It should look something like this: class AddMonkeysTable < ActiveRecord::Migration def self.up end
def self.down end end
Modify this code to look like this: class AddMonkeysTable < ActiveRecord::Migration def self.up create_table :monkeys do |t| t.column :name, :string t.column :angry?, :boolean end end
def self.down drop_table :monkeys end end
To create the table specified by this migration, from the command line in the terminal (opened previously from Locomotive), type: rake migrate
Success! Move on to generating scaffolding to make use of your new database table."
No problems up until the step 6, rake migrate. Here is the error:
"c0a80004:~/Documents/work/depot jim$ ruby script/generate migration add_monkeys_table create db/migrate create db/migrate/001_add_monkeys_table.rb c0a80004:~/Documents/work/depot jim$ rake migrate (in /Users/jim/Documents/work/depot) rake aborted! Unknown database 'depot_development'
(See full trace by running task with --trace) c0a80004:~/Documents/work/depot jim$ "
I can see it is obviously something with the database, I have a clean install of mySQL installed as recommended on the locomotive site. Can anyone help me identify what I am doing wrong so I can get coding with Rails!
Help much appreciated, thankyou in advance.