Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
heroku运行错误,错误的URI_Heroku_Ruby On Rails 4 - Fatal编程技术网

heroku运行错误,错误的URI

heroku运行错误,错误的URI,heroku,ruby-on-rails-4,Heroku,Ruby On Rails 4,我可以在本地mac pc上运行该应用程序。 但是当我运行heroku时,我得到了这个错误。但我不知道 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/ve

我可以在本地mac pc上运行该应用程序。 但是当我运行heroku时,我得到了这个错误。但我不知道

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>'
zzz-ui-MacBook-Pro:后端zzz$heroku运行包exec-rails控制台
正在运行连接到终端的“bundle exec rails console”。。。起来,跑
连接到数据库\u URL指定的数据库
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:176:in'split':错误的uri(不是uri?):(uri::InvalidURIError)
from/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:211:在'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='10'中
from/app/config/initializers/raven.rb:5:in'block in'
from/app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven.rb:62:在“配置”中
从/app/config/initializers/raven.rb:4:in`'
来自/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:245:in'load'
来自/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:245:in'block in load'
from/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:236:in'load\u dependency'
来自/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u 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层)in'
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'
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:“运行中的块初始化器”
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`'
from/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:251:in'require'
from/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:251:in'block in require'
from/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:236:in'load\u dependency'
from/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active\u support/dependencies.rb:251:in'require'
来自/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:103:在“require_环境”中
来自/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/commands.rb:40:in`'
来自脚本/rails:6:in'require'
来自脚本/rails:6:in`'
请帮帮我。
谢谢~

检查配置变量,尤其是
数据库\u URL
,如图所示。另外,请验证您是否已将Heroku加载项用于Postgres、Mongo、Neo4J或您正在使用的任何东西,而不是自己连接任何东西。

错误来自:

config/initializers/raven.rb
这看起来与哨兵乌鸦宝石有关,基于上面的堆栈跟踪线。您应该检查该gem的文档,并确保该初始值设定项中的任何代码以及任何环境变量都已针对heroku上的生产环境进行了适当的设置