Women in Technology

Hear us Roar



Article:
  Rolling with Ruby on Rails
Subject:   script/server:49
Date:   2005-09-18 13:54:46
From:   clumsychild
Okay, I have just started using Ruby on Rails and I keep having the same problem over and over again I keep getting


Mysql::Error in Recipe#new


#42000Incorrect database name 'cookbook '


script/server:49


Show framework trace


c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/vendor/mysql.rb:452:in `read'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/vendor/mysql411.rb:103:in `real_connect'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/mysql_adapter.rb:39:in `mysql_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/query_cache.rb:52:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/query_cache.rb:52:in `connection='
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/abstract_adapter.rb:108:in `retrieve_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:239:in `connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:246:in `connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1322:in `attributes_from_column_definition'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:928:in `initialize_without_callbacks'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:236:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:116:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:116:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in `perform_action_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in `dispatch'



Request


Parameters: None


Show session dump


---
flash: !ruby/hash:ActionController::Flash::FlashHash {}


Response
Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}


Everytime I go to load up the database with Ruby, I have tried restarting the script server, rebooting I have followed the first tutorial exactly and I keep ending up with that. Now I'm not new to program, but I have no idea what is happening. Any help would be useful.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Curt Hibbs photo script/server:49
    2005-09-18 19:01:25  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    It looks like to got a space character at the end of your database name in the file database.yml -- from you error message above it looks like you've got "cookbook " in there when it should be just "cookbook". Go delete the extra space character and see if that helps.