I’ve just started the ebook and already ive hit problems. Upon changing the migrate file to:
class CreateProducts < ActiveRecord::Migration def change create_table :products do |t| t.string :title t.text :description t.string :image_url t.decimal :price, precision: 8, scale: 2 t.timestamps end end end
I’m getting the error:
C:\Users\Mat\work\depot>rake db:migrate rake aborted! C:/Users/Mat/work/depot/db/migrate/20120223214304_create_products.rb:7: syntax e rror, unexpected tINTEGER, expecting kEND t.decimal :price, :precision 8, scale: 2 ^
Tasks: TOP => db:migrate (See full trace by running task with –trace)
I’ve checked and it’s identical to the books format and there’s no rogue characters. Can anyone help me?