Hi I am reading O'Reilly Rails Cookbook, but I can not get the examples working. Here is what I have done so far:
rails mytest --database=mysql ruby script/generate migration build_db --BuildDb class-- class BuildDb < ActiveRecord::Migration def self.up create_table :schedules, :force => true do |t| t.column :scheduleTime, :datetime t.column :repeatEveryYear, :boolean t.column :message, :string t.timestamps end end def self.down drop_table :schedules end end --BuildDb class-- rake db:migrate ruby script/generate model schedules (generates a new empty migration, I deleted it) ruby script/generate controller schedules Edited my controller, and added: scaffold :schedules But when I try to test my application, the mongrel log gives me this: Wed Aug 11 12:06:10 +0200 2010: Error calling Dispatcher.dispatch #<NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.split> /Users/sneigaard/.gem/ruby/1.8/gems/actionpack-2.3.8/lib/ action_controller/cgi_process.rb:52:in `dispatch_cgi' /Users/sneigaard/.gem/ruby/1.8/gems/actionpack-2.3.8/lib/ action_controller/dispatcher.rb:101:in `dispatch_cgi' /Users/sneigaard/.gem/ruby/1.8/gems/actionpack-2.3.8/lib/ action_controller/dispatcher.rb:27:in `dispatch' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb: 76:in `process' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb: 74:in `synchronize' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb: 74:in `process' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ configurator.rb:282:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ configurator.rb:281:in `each' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ configurator.rb:281:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ command.rb:212:in `run' /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load' /usr/bin/mongrel_rails:19 Hm well should this not work? Thank you Søren -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.