一些更新_Ruby on Rails 3 Tutorial书评-查字典图书网
查字典图书网
当前位置: 查字典 > 图书网 > 编程 > Ruby on Rails 3 Tutorial > 一些更新
李没有乱七八糟 Ruby on Rails 3 Tutorial 的书评 发表时间:2014-08-30 06:08:29

一些更新

以下仅针对 ruby -v 2.12 and rails -v 4.1.5
1.
In Rails 4.1+, they deprecated db:test:prepare with that message. You can now just use:
ActiveRecord::Migration.maintain_test_schema!
in spec_helper.rb (or similar files if you're not using RSpec). That will automatically keep your test database in sync with your schema. Because of this 'automatic' method, db:test:prepare is no longer needed in most cases.
If you need to do it manually for some reason, you can still use
rake db:schema:load RAILS_ENV=test

reference: http://stackoverflow.com/questions/23351783/when-i-ran-bundle-exec-rake-testprepare-it-errored-out-but-bundle-exec-rake
~~~~~~~~~~~~~~~~~~~~
2. Section 10.2.2
User.all(limit: 6) 更改为 User.limit(6)

reference: http://stackoverflow.com/questions/23749612/wrong-number-of-arguments-1-for-0-hartl-chapter-10-bundle-exec-rake-dbpopul
~~~~~~~~~~~~~~~~~~~~

展开全文
有用 0 无用 0

您对该书评有什么想说的?

发 表

推荐文章

猜你喜欢

附近的人在看

推荐阅读

拓展阅读