收录日期:2019/04/24 20:38:13 时间:2010-06-16 02:27:31 标签:ruby-on-rails,file,rubygems

I keep getting this error for different gems, the most recent is acts_as_reportable:

no such file to load -- acts_as_reportable

However, I have the following line in my environment.rb:

config.gem 'acts_as_reportable'

And I also ran the following:

>gem install acts_as_reportable

It it output:

>gem install acts_as_reportable
Successfully installed acts_as_reportable-1.1.1
1 gem installed
Installing ri documentation for acts_as_reportable-1.1.1...
Installing RDoc documentation for acts_as_reportable-1.1.1...

What do I need to do?

config.gem 'acts_as_reportable', :lib => 'ruport/acts_as_reportable'

Found the correct require in the Ruport documentation here. Explanation of the :lib option in the Rails API here.