我正在尝试使用Populator gem。我刚安装它,但Ruby无法加载它。我的机器上只有一个Ruby安装,它是Ruby 1.8.7。我该怎么办?
This is the gem that doesn't get loaded。
编辑:这是追踪。我应该早点把它包括在内。
Freenaut:bio-clinical newuser$ rake db:populate --trace
(in /Users/newuser/Dropbox/Sites/rails/bio-clinical)
** Invoke db:populate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:populate
rake aborted!
no such file to load -- populator
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/newuser/.gem/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
答案 0 :(得分:1)
迄今为止,Populate插件不支持Rails 3。 有关当前状态,请参阅the GitHub site。
这似乎是一个非常方便的插件,希望很快就会有Rails 3的支持。
答案 1 :(得分:0)
您使用的是Rails还是Ruby?
你使用过
吗?require 'rubygems'
之前的require 'populator'
?