2013-12-08 71 views
1

我可以在我的本地mac pc上運行應用程序。 但是當我運行heroku時,我得到了這個錯誤。但我不知道...heroku運行錯誤,壞URI

zzz-ui-MacBook-Pro:backend zzz$ heroku run bundle exec rails console 

Running `bundle exec rails console` attached to terminal... up, run.7525 
Connecting to database specified by DATABASE_URL 
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): (URI::InvalidURIError) 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:211:in `parse' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:747:in `parse' 
    from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven/configuration.rb:96:in `server=' 
    from /app/config/initializers/raven.rb:5:in `block in <top (required)>' 
    from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven.rb:62:in `configure' 
    from /app/config/initializers/raven.rb:4:in `<top (required)>' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `block in load' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `each' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `block in <class:Engine>' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing' 
    from /app/config/environment.rb:5:in `<top (required)>' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:103:in `require_environment!' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/commands.rb:40:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

請幫幫我。 謝謝〜!

回答

0

檢查您的配置變量,特別是DATABASE_URL,如here所示。同時驗證你使用了Postgres,Mongo,Neo4J的Heroku插件,或者你使用的任何東西,而不是自己連接任何東西。

config/initializers/raven.rb 

它看起來像它有事情做與sentry-raven寶石,基於堆棧跟蹤線正上方的是:

3

誤差的來源。您應該檢查該gem的文檔,並確保該初始化程序中的任何代碼以及所有環境變量均適合您在heroku上的生產環境。

相關問題