首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Redmine插件'init.rb‘中请求gem失败

在Redmine插件'init.rb‘中请求gem失败
EN

Stack Overflow用户
提问于 2012-06-27 01:37:15
回答 1查看 1.9K关注 0票数 1

我正在为Redmin2.0和插件的'init.rb‘中的以下行构建一个插件

代码语言:javascript
复制
require 'ice_cube'

即使安装了'ice_cube‘并在执行'gem list’时出现加载错误,我使用的是带有Ruby1.9.3p0(2011年10月30日修订版33570) x86_64-darwin11.2.0的rvm

以下是错误日志:

代码语言:javascript
复制
/Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- ice_cube (LoadError)
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/plugins/redmine_asset_tracker/init.rb:2:in `<top (required)>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/lib/redmine/plugin.rb:129:in `block in load'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/lib/redmine/plugin.rb:120:in `each'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/lib/redmine/plugin.rb:120:in `load'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config/initializers/30-redmine.rb:13:in `<top (required)>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `block in load'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/engine.rb:587:in `each'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/engine.rb:587:in `block in <class:Engine>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config/environment.rb:14:in `<top (required)>'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config.ru:4:in `require'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config.ru:4:in `block in <main>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config.ru:1:in `new'
    from /Users/myth/Learn/Code/Berkman GSOC 2012/Berkman/redmine/config.ru:1:in `<main>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in `start'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
    from /Users/myth/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-27 04:19:00

我找到了问题的解决方案:

在您的插件目录中添加一个'Gemfile‘,其中包含所有列出的gem,点击'bundle’,然后要求完美工作。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11212930

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档