我正在使用rails版本'2.3.18'的維護項目。 我能夠運行遷移但無法獲取數據。 有一個在DB號seeds.rb文件,但有一個名爲example_data.rb作爲一個文件:如何運行位於rails(版本2.3.18)db文件夾中的文件
module FixtureReplacement
attributes_for :category do |c|
c.name = "General"
c.desc = "general"
end
attributes_for :price, :from => :equity do |a|
a.etype = "dollars"
a.exchange = '60'
end
..........................
.................
end
我認爲這是該項目的種子文件。我試着運行
rake db:example_data(recollecting rake db:seed),但沒有運氣。
請幫助我,如何運行此文件。
在所有項目文件中進行研究並查找'FixtureReplacement',您可能會發現一個調用此模塊的特定文件,並可能提示如何運行它。 – MrYoshiji