Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/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
Activerecord Heroku推送时数据库URL无效-Heroku错误,现已修复_Activerecord_Heroku_Sinatra - Fatal编程技术网

Activerecord Heroku推送时数据库URL无效-Heroku错误,现已修复

Activerecord Heroku推送时数据库URL无效-Heroku错误,现已修复,activerecord,heroku,sinatra,Activerecord,Heroku,Sinatra,编辑: 这是Heroku的一个临时错误,他们已经修复了 我对heroku的推送/部署在上周运行时失败。这是一个sinatra应用程序,在cedar堆栈上使用activerecord 我能够在Heroku中部署并运行我的应用程序好几次。我用的是postgres和cedar stack 我对app.rb进行了一次空格更改,并按下了按钮,但该按钮未被接受 该应用程序目前正在使用上周的代码在服务器上运行。它正在使用数据库,所以它可以看到它 Heroku info和Heroku config正确列出了数据

编辑:

这是Heroku的一个临时错误,他们已经修复了

我对heroku的推送/部署在上周运行时失败。这是一个sinatra应用程序,在cedar堆栈上使用activerecord

我能够在Heroku中部署并运行我的应用程序好几次。我用的是postgres和cedar stack

我对app.rb进行了一次空格更改,并按下了按钮,但该按钮未被接受

该应用程序目前正在使用上周的代码在服务器上运行。它正在使用数据库,所以它可以看到它

Heroku info和Heroku config正确列出了数据库的URL

我已经创建了一个新的数据库,并对其进行了升级,但这无助于运行实例使用新的数据库

我在cedar stack上创建了一个新的dyno,设置了一个新的db并对其进行了配置,但由于同样的错误,无法将代码推送到它

以下是错误消息: 在本例中,我尝试使用最新版本的sinatra activerecord来查看是否存在它没有帮助的bug

git push heroku heroku_bug_before:master
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 1.60 KiB, done.
Total 14 (delta 9), reused 0 (delta 0)

-----> Ruby/Rack app detected
-----> Using Ruby version: ruby-1.9.2
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/.........
       Fetching gem metadata from https://rubygems.org/..
       Using i18n (0.6.1)
       Using multi_json (1.7.7)
       Using activesupport (3.2.13)
       Using builder (3.0.4)
       Using activemodel (3.2.13)
       Using arel (3.0.2)
       Using tzinfo (0.3.37)
       Using activerecord (3.2.13)
       Using backports (3.3.3)
       Using bond (0.4.3)
       Using eventmachine (1.0.3)
       Using kgio (2.8.0)
       Using libxml-ruby (2.6.0)
       Using mime-types (1.23)
       Using oj (2.1.4)
       Using pg (0.15.1)
       Using r18n-core (1.1.5)
       Using rack (1.5.2)
       Using rack-protection (1.5.0)
       Using rack-test (0.6.2)
       Using raindrops (0.11.0)
       Using rest-client (1.6.7)
       Using ripl (0.7.0)
       Using ripl-multi_line (0.3.1)
       Using ripl-rack (0.2.0)
       Using tilt (1.4.1)
       Using sinatra (1.3.2)
       Installing sinatra-activerecord (1.2.3)
       Using sinatra-contrib (1.3.2)
       Using sinatra-flash (0.3.0)
       Using sinatra-r18n (1.1.5)
       Using tux (0.3.0)
       Using unicorn (4.6.3)
       Using bundler (1.3.2)
       Your bundle is complete! It was installed into ./vendor/bundle
       Cleaning up the bundler cache.
       Removing sinatra-activerecord (1.2.2)
-----> Writing config/database.yml to read from DATABASE_URL
 !
 !     rake aborted!
 !     Invalid DATABASE_URL
 !     (erb):9:in `rescue in <main>'
 !     (erb):6:in `<main>'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/erb.rb:753:in `eval'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/erb.rb:753:in `result'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-activerecord-1.2.3/lib/sinatra/activerecord.rb:39:in `database_file='
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:983:in `set'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-activerecord-1.2.3/lib/sinatra/activerecord.rb:50:in `registered'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1262:in `block in register'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1260:in `each'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1260:in `register'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1590:in `register'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1630:in `register'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-activerecord-1.2.3/lib/sinatra/activerecord.rb:76:in `<module:Sinatra>'
 !     /tmp/build_2b0q7ep6511dz/vendor/bundle/ruby/1.9.1/gems/sinatra-activerecord-1.2.3/lib/sinatra/activerecord.rb:6:in `<top (required)>'
 !     /tmp/build_2b0q7ep6511dz/app.rb:2:in `require'
 !     /tmp/build_2b0q7ep6511dz/app.rb:2:in `<top (required)>'
 !     /tmp/build_2b0q7ep6511dz/Rakefile:1:in `require'
 !     /tmp/build_2b0q7ep6511dz/Rakefile:1:in `<top (required)>'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
 !     (eval):1:in `block in standard_rake_options'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2213:in `eval'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2213:in `block in standard_rake_options'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1308:in `call'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1308:in `block in parse_in_order'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1264:in `catch'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1264:in `parse_in_order'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1258:in `order!'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1349:in `permute!'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/optparse.rb:1370:in `parse!'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2303:in `handle_options'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:1999:in `block in init'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:1997:in `init'
 !     /tmp/ruby-1.9.2/lib/ruby/1.9.1/rake.rb:1990:in `run'
 !     /tmp/ruby-1.9.2/bin/rake:31:in `<main>'
 !     (in /tmp/build_2b0q7ep6511dz)
 !
sh: Syntax error: Unterminated quoted string

 !     Push rejected, failed to compile Ruby/Rack app
heroku pg:信息

=== HEROKU_POSTGRESQL_COBALT_URL (DATABASE_URL)
Plan:        Dev
Status:      available
Connections: 4
PG Version:  9.2.4
Created:     2013-07-23 17:49 UTC
Data Size:   6.4 MB
Tables:      2
Rows:        4/10000 (In compliance) - refreshing
Fork/Follow: Unsupported
Region:      Europe
heroku信息

=== herokuapp
Addons:        heroku-postgresql:dev
               heroku-postgresql:dev

Git URL:       xxx
Owner Email:   mine@example.com
Region:        eu
Repo Size:     8M
Slug Size:     17M
Stack:         cedar
Tier:          Legacy
Web URL:       http://xxx.herokuapp.com/
我花了好几个小时在这上面——它上周还在工作,但现在已经不工作了。我正在使用Unicorn和ActiveRecord,并按照文档中的建议进行操作


有什么想法吗?

关于Padrino/Datamapper和Heroku Postgre的基本计划,我从今天早上开始就无法部署

当我运行“heroku config”时,DATABASE_URL config变量似乎设置正确,我可以使用ENV['DATABASE_URL']从Padrino控制台访问它,因此不确定是什么导致了问题

这家伙已经能够直接使用HEROKU_POSTGRESQL_color_URL,它修复了它,但不用于我的应用程序

看起来Heroku部署脚本有问题,最好的办法是向他们提出问题

对不起,这更多的是一个评论,而不是一个实际的答案,显然我没有足够的评论代表


编辑:Heroku回复我的问题,说问题已经解决,我可以再次成功部署我的应用程序。

谢谢!这似乎确实是希罗库自己的错误,他们现在已经纠正了。它已经成功推送。嘿,伙计们,它似乎再次出现,今天2013年11月9日,我正试图在heroku上部署一个简单的应用程序,它得到部署,但当我访问浏览器中的URL时,它抛出500个内部服务器错误和无效的数据库URL,任何想法谢谢。
=== herokuapp
Addons:        heroku-postgresql:dev
               heroku-postgresql:dev

Git URL:       xxx
Owner Email:   mine@example.com
Region:        eu
Repo Size:     8M
Slug Size:     17M
Stack:         cedar
Tier:          Legacy
Web URL:       http://xxx.herokuapp.com/