没有这样的文件加载 - 但在rails中的environtment.rb文件中的文件是config.gem [英] no such file to load -- yet file is config.gem in environtment.rb file in rails

查看:98
本文介绍了没有这样的文件加载 - 但在rails中的environtment.rb文件中的文件是config.gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 没有要加载的文件 -  acts_as_reportable 

但是,我在我的environment.rb中有以下行:


config.gem'acts_as_reportable'


我还运行以下内容:

 > gem install acts_as_reportable 

它输出:

 > gem install acts_as_reportable 
成功安装了acts_as_reportable-1.1 .1
1 gem已安装
安装ri文档acts_as_reportable-1.1.1 ...
安装RDoc文档acts_as_reportable-1.1.1 ...

我需要做什么?

解决方案

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

在Ruport文档中找到正确的要求这里。 Rails API中的lib选项说明此处


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.

这篇关于没有这样的文件加载 - 但在rails中的environtment.rb文件中的文件是config.gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆