首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用gruff gem加载Rails应用程序

无法使用gruff gem加载Rails应用程序
EN

Stack Overflow用户
提问于 2009-12-01 03:17:16
回答 1查看 1.1K关注 0票数 0

我正在尝试加载一个使用Gruff gem的Ruby on Rails应用程序。我可以在irb中很好地加载Gruff,但每当我试图(通过ruby script/server)加载这个应用程序时,它就会崩溃。下面是完整的堆栈跟踪:

代码语言:javascript
复制
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:303:in `search': undefined method `empty?' for :gruff:Symbol (NoMethodError)
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:274:in `find_name'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:259:in `activate'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:67:in `gem'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/config/environment.rb:60
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in `rails'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:149:in `call'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:149:in `listener'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:50:in `call'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:50:in `initialize'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
    from /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/railties/lib/commands/servers/mongrel.rb:60
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
    from /Users/mdippery/Projects/nees/ceespm/rails-server/vendor/rails/railties/lib/commands/server.rb:39
    from script/server:3:in `require'
    from script/server:3

我如何才能修复这个问题,使应用程序能够运行?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2009-12-01 19:26:59

gem需要直接安装到您的rails应用目录中吗?

来自here

Rails插件

Gruff很容易与Rails一起使用。

gem安装gruff cd供应商/插件&& gem解包gruff

如果你只做过gem install gruff,这可能会解释为什么它不能在rails中工作,而能在irb中工作。

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

https://stackoverflow.com/questions/1821807

复制
相关文章

相似问题

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