Hi. I''ve just started using Ruby on Rails. Now I''ve got my first problem. I generated a new migration ''add_price'' and get the 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 occured while evaluating nil.[] (See full trace by running task with --trace) D:\ruby\work\depot>rake db:migrate --trace (in D:/ruby/work/depot) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == 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 occured while evaluating nil.[] d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ adapters/abstract/schema_statements.rb:259:in `type_to_sql'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ adapters/abstract/schema_statements.rb:122:in `add_column'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:273:in `method_missing'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:257:in `say_with_time'' d:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:257:in `say_with_time'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:271:in `method_missing'' ./db/migrate//002_add_price.rb:3:in `real_up'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:210:in `migrate'' d:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:210:in `migrate'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:333:in `migrate'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:328:in `migrate'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:295:in `up'' d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r b:286:in `migrate'' d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/databases.rake:4 d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' d:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 d:/ruby/bin/rake.bat:25 Any idea for the reason? Thanks, Juergen -- Posted via http://www.ruby-forum.com/.
You need ''edgerails'' if you want to use the decimal column. Check the AWDWR errata as it should mention something about it. Rails allows you to have multiple versions of itself. You''d need to update to edgerails for the Depot application only. Stuart On 8/16/06, Juergen Grommes <juergen.grommes@fit.fraunhofer.de> wrote:> Hi. > I''ve just started using Ruby on Rails. > Now I''ve got my first problem. > > I generated a new migration ''add_price'' and get the 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 occured while evaluating nil.[] > (See full trace by running task with --trace) > D:\ruby\work\depot>rake db:migrate --trace > (in D:/ruby/work/depot) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > == 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 occured while evaluating nil.[] > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ > adapters/abstract/schema_statements.rb:259:in `type_to_sql'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ > adapters/abstract/schema_statements.rb:122:in `add_column'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:273:in `method_missing'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:257:in `say_with_time'' > d:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:257:in `say_with_time'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:271:in `method_missing'' > ./db/migrate//002_add_price.rb:3:in `real_up'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:210:in `migrate'' > d:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:210:in `migrate'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:333:in `migrate'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:328:in `migrate'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:295:in `up'' > d:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r > b:286:in `migrate'' > d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/databases.rake:4 > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' > d:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 > d:/ruby/bin/rake.bat:25 > > Any idea for the reason? > > Thanks, > > Juergen > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> You''d need to update to > edgerails for the Depot application only.Can you tell me how to do this? -- Posted via http://www.ruby-forum.com/.
http://wiki.rubyonrails.org/rails/pages/EdgeRails I chose the "easy way". Just make sure you are in the depot directory when you run the command. Stuart On 8/16/06, Juergen Grommes <juergen.grommes@fit.fraunhofer.de> wrote:> > You''d need to update to > > edgerails for the Depot application only. > > Can you tell me how to do this? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> http://wiki.rubyonrails.org/rails/pages/EdgeRails > I chose the "easy way".i just get another error message while starting the easy way D:\ruby\work\depot>rake rails:freeze:edge --trace (in D:/ruby/work/depot) ** Invoke rails:freeze:edge (first_time) ** Execute rails:freeze:edge d:/ruby/bin/rake.bat: No such file or directory - svn --version ERROR: Must have subversion (svn) available in the PATH to lock this application to Edge Rails rake aborted! exit d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/framework.rake:41:in `exit'' d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/framework.rake:41 d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' d:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 d:/ruby/bin/rake.bat:25 D:\ruby\work\depot> -- Posted via http://www.ruby-forum.com/.
you''ll have to install subversion (svn). its a version control system. for more info and downloads, visit http://subversion.tigris.org 2006/8/16, Juergen Grommes <juergen.grommes@fit.fraunhofer.de>:> > > > http://wiki.rubyonrails.org/rails/pages/EdgeRails > > I chose the "easy way". > > i just get another error message while starting the easy way > > D:\ruby\work\depot>rake rails:freeze:edge --trace > (in D:/ruby/work/depot) > ** Invoke rails:freeze:edge (first_time) > ** Execute rails:freeze:edge > d:/ruby/bin/rake.bat: No such file or directory - svn --version > ERROR: Must have subversion (svn) available in the PATH to lock this > application to Edge Rails rake aborted! > exit > d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/framework.rake:41:in > `exit'' > d:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/framework.rake:41 > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' > d:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' > d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 > d:/ruby/bin/rake.bat:25 > D:\ruby\work\depot> > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Michael Siebert <info@siebert-wd.de> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060816/237976b3/attachment.html
On 8/16/06, Juergen Grommes <juergen.grommes@fit.fraunhofer.de> wrote:> ERROR: Must have subversion (svn) available in the PATH to lock this > application to Edge Rails rake aborted! > exitIf you have subversion /svn/ then make sure it''s in the environmental path, otherwise, yes you''d need to install it. S