无法在Heroku上运行控制台

时间:2012-10-06 21:53:18

标签: ruby-on-rails heroku

我正在尝试在Heroku服务器上部署我的应用程序,但出于某种原因,我无法启动我的应用程序,也无法启动run console。当我尝试执行heroku run console时,我得到以下内容:

MacBook:threexortwo lander$ heroku run console
Running `console` attached to terminal... up, run.1  
Rubber[ERROR]: Unable to read rubber configuration from /app/config/rubber/rubber.yml  
(erb):301:in `<main>': undefined local variable or method `rubber_env' for main:Object (NameError)  
    from /usr/local/lib/ruby/1.9.1/erb.rb:753:in `eval'  
    from /usr/local/lib/ruby/1.9.1/erb.rb:753:in `result'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/environment.rb:39:in `read_config'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/environment.rb:30:in `block in initialize'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/environment.rb:30:in `each'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/environment.rb:30:in `initialize'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/configuration.rb:37:in `new'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/configuration.rb:37:in `initialize'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/configuration.rb:14:in `new'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/configuration.rb:14:in `get_configuration'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/configuration.rb:22:in `rubber_env'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber.rb:53:in `config'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber.rb:31:in `initialize'  
    from /app/vendor/bundle/ruby/1.9.1/gems/rubber-2.1.2/lib/rubber/railtie.rb:9:in `block in <class:Railtie>'  
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:34:in `call'  
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'  
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'  
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `each'  
    from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'  
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:67:in `inherited'  
    from /app/config/application.rb:13:in `<module:Threexortwo>'  
    from /app/config/application.rb:12:in `<top (required)>'  
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:39:in `require'  
    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/commands.rb:39:in `<top (required)>'  
    from script/rails:6:in `require'  
    from script/rails:6:in `<main>'  

以前,我正在使用Amazon EC2服务器,并使用rubber。在使用rubber做任何事情之前,我创建了一个备份(几乎只是压缩了项目),然后删除了vulcanized版本,恢复旧版本,并卸载了`rubber。当我在本地运行我的服务器应用程序时,我没有遇到这个问题,而且只有在与Heroku混淆时才会得到它。

1 个答案:

答案 0 :(得分:1)

看起来橡胶仍在你的宝石文件中。 Heroku读入您的gemfile并安装列出的所有gem。

尝试删除它。