rake aborted undefined method precision()

I am following Aqile Web Development IV, page 82, added precision to the
migration

class CreateProducts < ActiveRecord::Migration
def self.up
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
def self.down
drop_table :products
end
end

when I run rake db:migrate I get an error:

--create_table (:products)
--precision()
rake aborted!
An error has occurred, this migration cancelled:

undefined method 'precision' for
#ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x47a07b0

how do I solv this?

Per-Olof

I solved the issue by uninstalling Ruby 1.8.7, and installing 1.9.2

Per-Olof

Per-olof Hermansson wrote: