解决:是由于网络限制
我只是推送了我的应用程序,我需要运行我的迁移文件来初始化数据库
我收到以下错误:我该怎么办?
编辑:heroku运行bash -app appname产生相同的错误
Running rake db:migrate attached to terminal... /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `initialize': Operation timed out - connect(2) (Errno::ETIMEDOUT)
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `open'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `block in start'
from /Users/stan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:27:in `start'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/command/run.rb:36:in `index'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/command.rb:114:in `run'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/bin/heroku:14:in `<top (required)>'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
from /Users/stan/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'
这是运行heroku ps
来检查正在运行的进程的结果:
Process State Command
--------------------------------------------------------
run.1 complete for 24m bundle exec rake db:migrate
run.2 complete for 22m bundle exec rake db:migrate
run.3 complete for 16m bash
run.4 complete for 5m bundle exec rake db:migrate
run.5 complete for 1m bundle exec rake db:migrate
web.1 up for 6m bundle exec rails server -p $PORT
答案 0 :(得分:5)
Heroku在我的某些应用上遇到了迁移问题。他们告诉我这样做:
heroku run bash --app appname
rake db:migrate