2013-07-23 43 views
0

編輯:Heroku的無效DATABASE_URL推時 - Heroku的錯誤,現在固定

這與Heroku的一個臨時的錯誤,他們有固定的。


我推送/部署到heroku在上週工作時失敗。這是一個在雪松堆棧上使用activerecord的sinatra應用程序。

我能夠在Heroku中部署和運行多次應用程序。我使用postgres和雪松堆棧。

我已經做了一個空白更改爲app.rb並推送,並且推送未被接受。

該應用程序目前實際上使用上週的代碼在服務器上工作。它使用數據庫,所以它可以看到它。

Heroku info和heroku config正確列出了DATABASE_URL。

我已經創建了一個新的數據庫,並提出了,但它沒有幫助(運行實例使用新的數據庫好吧)。

我創建了一個新的dyno,在雪松堆棧上運行,建立一個新的數據庫並配置了它,但無法將代碼推送到它,併發生同樣的錯誤。

以下是錯誤消息: 在這種情況下,我想使用最新版本的ActiveRecord西納特拉,看看是否有一個錯誤(沒有幫助)

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的配置(你可以看到額外的分貝我加入,促進了)

=== visualtags Config Vars 
DATABASE_URL:     postgres://changed1:[email protected]:5432/changed1 
HEROKU_POSTGRESQL_COBALT_URL: postgres://changed2:[email protected]:5432/changed2 
HEROKU_POSTGRESQL_CYAN_URL: postgres://changed3:[email protected]:5432/changed3 

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: [email protected] 
Region:  eu 
Repo Size:  8M 
Slug Size:  17M 
Stack:   cedar 
Tier:   Legacy 
Web URL:  http://xxx.herokuapp.com/ 

我已經花了幾個小時就這一點 - 這是上週的工作,但現在不再起作用。我正在使用Unicorn和ActiveRecord,並按照文檔中的建議來處理此問題...

任何想法?

回答

-1

與Padrino/Datamapper和Heroku Postgre基本計劃一樣,我今天早上還沒有能夠部署。

當我運行'heroku config'時,DATABASE_URL配置var似乎被正確設置,我可以從帶有ENV ['DATABASE_URL']的Padrino控制檯訪問它,所以不知道是什麼導致了問題。

這個人configuring heroku database connection in padrino - DATABASE_URL fails已經能夠直接使用HEROKU_POSTGRESQL_color_URL,它修復了它,但不是我的應用程序。

看起來像Heroku的一個問題,部署腳本,做的最好的事情就是提高門票與他們https://help.heroku.com/tickets/new?query=postgre

(對不起這比實際的答案評論,顯然我沒有意見徵求足夠的代表處)


編輯:Heroku回覆我的票證說問題已修復,我可以再次成功部署我的應用程序。

+0

謝謝! Heroku的確看起來確實是一個錯誤,現在他們已經修復了它。它已經能夠推動成功。 – chippy

+0

嘿傢伙,它似乎再次出現,今天2013年11月9日,我試圖在heroku上部署一個簡單的應用程序它部署,但是當我訪問瀏覽器中的URL它會引發「500內部服務器錯誤」與「無效的DATABASE_URL 「,任何想法謝謝。 –