現在我將rails 3.0.7升級到rails 3.1 pre版本。當我創建一個示例項目時,它工作正常。創建腳手架後,我嘗試遷移,但它讓我耙子中止!信息。Rails 3.1 pre遷移問題
這裏我的代碼
rails g scaffold product name:string price:decimal category:string
invoke active_record
create db/migrate/20110517090853_create_products.rb
create app/models/product.rb
invoke test_unit
create test/unit/product_test.rb
create test/fixtures/products.yml
route resources :products
invoke scaffold_controller
create app/controllers/products_controller.rb
invoke erb
create app/views/products
create app/views/products/index.html.erb
create app/views/products/edit.html.erb
create app/views/products/show.html.erb
create app/views/products/new.html.erb
create app/views/products/_form.html.erb
invoke test_unit
create test/functional/products_controller_test.rb
invoke helper
create app/helpers/products_helper.rb
invoke test_unit
create test/unit/helpers/products_helper_test.rb
create app/assets/stylesheets/scaffold.css.scss
invoke assets
create app/assets/javascripts/products.js.coffee
create app/assets/stylesheets/products.css.scss
rake db:migrate
== CreateProducts: migrating =================================================
-- create_table(:products)
-> 0.0053s
== CreateProducts: migrated (0.0054s) ========================================
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `rows' for nil:NilClass
(See full trace by running task with --trace)
我使用Ruby 1.9.2和XAMPP。
任何人都可以知道是什麼問題?
我見過別人抱怨這一點,但沒有能夠複製它。你使用的是什麼版本的Ruby?在1.8.7和1.9.2上適合我。 – 2011-05-17 10:27:44
當你運行'rake db:migrate --trace'時,它指向什麼? – sscirrus 2011-05-17 10:28:34
是否適合您的較低版本的導軌? – corroded 2011-05-22 18:51:28