Ruby on rails 没有这样的文件要加载——但文件是rails中environment.rb文件中的config.gem
我在不同的gem中不断发现这个错误,最近的一个错误是acts_as_可报告的:Ruby on rails 没有这样的文件要加载——但文件是rails中environment.rb文件中的config.gem,ruby-on-rails,file,rubygems,Ruby On Rails,File,Rubygems,我在不同的gem中不断发现这个错误,最近的一个错误是acts_as_可报告的: no such file to load -- acts_as_reportable 但是,我的environment.rb中有以下行: config.gem“作为可报告的” 我还运行了以下程序: >gem install acts_as_reportable It输出: >gem install acts_as_reportable Successfully installed acts_as_re
no such file to load -- acts_as_reportable
但是,我的environment.rb中有以下行:
config.gem“作为可报告的”
我还运行了以下程序:
>gem install acts_as_reportable
It输出:
>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...
我需要做什么
config.gem 'acts_as_reportable', :lib => 'ruport/acts_as_reportable'
在Ruport文档中找到正确的要求。Rails API中:lib选项的说明。hmm……尽管acts as\u reportable在github上,但它不是独立的,它需要是一个lib。嗯…如果ruport网站解释了这一点就不好了…让我们看看吧@Angela怎么样
config.gem'acts_as_reportable',:lib=>'ruport/acts_as_reportable'
?嗯……不起作用,我不得不删除它,然后使用一个不太理想的'ruport/acts_as_reportable'。让我再试一次