search for: addpric

Displaying 8 results from an estimated 8 matches for "addpric".

Did you mean: addprinc
2006 Aug 02
2
Help please: AWDWR -- Migration failure
I''m having a problem with one of the migration files from the depot application. ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddPrice: migrating ======================================================== -- add_column(:products, :price, :decimal, {:scale=>2, :default=>0, :precision=> 8}) rake aborted! You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured...
2006 Aug 04
8
Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
People, I''m looking at the migrate example on p 74 of the rails2.pdf It''s a simple example of using a migration to add a column to the products table. Here is a copy of the migration file named 002_add_price.rb after I generated and then edited it: class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0 end def self.down remove_column :products, :price end end I see this error when I walk through the demo: bash mac maco /pt/books/rails2_my_depo...
2006 Aug 16
6
Newbie-Question
...message: D:\ruby\work\depot>rake db:migrate (in D:/ruby/work/depot) == AddPrice: migrating ======================================================== -- add_column(:products, :pice, :decimal, {:default=>0, :precision=>8, :scale=>2 }) rake aborted! You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error o...
2007 Aug 12
10
about chinese display
hello: I have built a project with Instant Rails.Now only a database and a scaffold based on a product model have finished.But when i inputted "../admin/list" in my browser,i found my chinese characters cound not display normally.Then i made five steps: 1 ajusting encoding in my browser menu 2 in "C:\InstantRails\conf_files\my.ini"directory,making sure
2006 Nov 16
4
rake db:migrate problem
...ting nil.[]" I ran --trace and get the following, but I am not sure what it means. Can anyone help me make sense out of it? Thanks Mike Rensing (in /Users/mike/work/depot) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddPrice: migrating ======================================================== -- add_column(:products, :price, :decimal, {:default=>0, :precision=>8, :scale=>2}) rake aborted! You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured...
2007 Feb 09
0
rake aborted!!
...t.column :description, :text t.column :image_url, :string end end def self.down drop_table :products end end This has created a table no problem. I''ve then added another column using the following ruby script/generate migration add_price This has worked. class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision =>8, :scale =>2, :default =>0 end def self.down remove_column :products, :price end end After creating the 002 migration file above and running rake db:migrate I get a rake aborte...
2007 Jan 21
6
rake db:migrate "undefined method `default'" error
...PS: Here''s the full output with the trace parameter: dkarnows@star:/share/David/radrails/workspace/depot$ rake db:migrate --trace (in /share/David/radrails/workspace/depot) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddPrice: migrating ======================================================== -- default() rake aborted! undefined method `default'' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0xb74f240c> /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/migration.rb:275:in `send'...
2006 Jun 06
15
error working through Agile !!!
Hi everyone, I''m working my way thru the ''Depot'' project from Agile Web Development with Rails. I got to the bit where I type: ruby script/generate scaffold Product admin And I get the following error: error Before updating scaffolding from new DB schema, try creating a table for your model (Product) ( on the last line ! ) Now I have followed everything as