问题描述
我想使用CSV装置,但是当我做耙分贝:灯具:负载
时,报告说在缺乏YAML文件测试/夹具
。一切工作正常时,灯具在YAML和文件以使用.yml
。
I am trying to use CSV fixtures, but when I do rake db:fixtures:load
, it complains about the lack of YAML files in test/fixtures
. Everything works fine when the fixtures are in YAML and the files end in .yml
.
此外,当我看code。在的ActiveRecord-3.2.3 / lib中/ active_record / fixtures.rb
,我看完全没有提及CSV处理。看来, fixtures.rb
只知道如何使用YAML灯具。
Furthermore, when I look at the code in activerecord-3.2.3/lib/active_record/fixtures.rb
, I see absolutely no reference to CSV processing. It appears that fixtures.rb
only knows how to use YAML fixtures.
什么是在这里?有CSV装置被德precated?
What is up here? Have CSV fixtures been deprecated?
推荐答案
CSV灯具德precated和支持将在Rails的3.2.0被删除
CSV Fixtures are deprecated and support will be removed in Rails 3.2.0
http://guides.rubyonrails.org/3_1_release_notes.html
https://github.com/rails/rails/commit/1716da07204193c8acf967e2d75a53a82e4c7c28#activerecord/lib/active_record/fixtures.rb
这篇关于Rails会找不到CSV夹具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!