找个人来问一下!第一个rails例子啊!
xtwxfxk
|
1#
xtwxfxk 发表于 2008-07-17 12:23
找个人来问一下!第一个rails例子啊!
NULL pointer given!
照书上弄的depot这个例子!老提示上面的错误!看看有没有人遇到过! 问一下! 这个是Full Trace里面的内容!我是使用逆向工程来生成mysql数据库的!所以php?name=%C1%AC%BD%D3" onclick="tagshow(event)" class="t_tag">连接上应该没问题!但不知道是什么错误!很无语啊! (eval):3:in `each_hash' (eval):3:in `all_hashes' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:516:in `select' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:80:in `cache_sql' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:59:in `select_all' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:582:in `find_by_sql' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1341:in `find_every' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:536:in `find' vendor/plugins/classic_pagination/lib/pagination.rb:186:in `find_collection_for_pagination' vendor/plugins/classic_pagination/lib/pagination.rb:202:in `paginator_and_collection_for' vendor/plugins/classic_pagination/lib/pagination.rb:133:in `paginate' vendor/plugins/scaffolding/lib/scaffolding.rb:107:in `list' vendor/plugins/scaffolding/lib/scaffolding.rb:95:in `index' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' D:/Software/ruby-1.8.6/lib/ruby/1.8/benchmark.rb:293:in `measure' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in `handle_request' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in `dispatch' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `synchronize' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in `dispatch' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in `dispatch' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/webrick_server.rb:112:in `handle_dispatch' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/webrick_server.rb:78:in `service' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' D:/Software/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/webrick_server.rb:62:in `dispatch' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/webrick.rb:66 D:/Software/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' D:/Software/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' D:/Software/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 D:/Software/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' D:/Software/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' script/server:3 -e:2:in `load' -e:2 |