2
我已經安裝了‘排版,文字’在我的測試環境Rails的FactoryGirl錯誤「未定義的方法'產生」爲LoremIpsum:模塊(NoMethodError)」
group :development, :test do
gem "lorem-ipsum"
end
寶石,但我得到NoMethodError。
這裏是我的代碼片段
sequence(:random_string) {|n| "#{LoremIpsum.generate}#{n}" }
任何幫助嗎?
你在測試環境下在Gemfile中包含了lorem-ipsum gem嗎? – 2013-03-20 09:50:35
是的我已經包含 – 2013-03-20 09:51:30
你需要'lorem-ipsum'在你的helper.rb文件中嗎? – 2013-03-20 09:59:04