heroku db:推不起作用

时间:2012-11-16 07:13:46

标签: ruby-on-rails ruby-on-rails-3 heroku

我的本​​地计算机上有一个应用程序,里面有大量的数据。
现在我已经在heroku上部署了应用程序,但是当我正在做heroku db时:推送它会发出以下错误


 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       unexpected nil (OkJson::ParserError)
       Backtrace:   C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/vendo
r/okjson.rb:82:in `valparse'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/vendo
r/okjson.rb:64:in `textparse'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/vendo
r/okjson.rb:43:in `decode'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
operation.rb:419:in `push_indexes'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
operation.rb:408:in `block in run'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
operation.rb:203:in `call'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
operation.rb:203:in `catch_errors'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
operation.rb:405:in `run'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/
cli.rb:171:in `clientxfer'
                 C:/Users/MY-PC/.heroku/client/lib/heroku/command/db.rb:192:in `
taps_client'
                 C:/Users/MY-PC/.heroku/client/lib/heroku/command/db.rb:30:in `p
ush'
                 C:/Users/MY-PC/.heroku/client/lib/heroku/command.rb:206:in `run
'
                 C:/Users/MY-PC/.heroku/client/lib/heroku/cli.rb:28:in `start'
                 C:/Program Files (x86)/Heroku/bin/heroku:24:in `'

    Command:     heroku db:push
    Version:     heroku/toolbelt/2.33.1 (i386-mingw32) ruby/1.9.2



我的宝石文件是:

source 'https://rubygems.org'

gem 'rails', '3.2.9'

group :development do
  gem 'sqlite3',"1.3.5"
end

group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails','2.0.2'

group :production do
    gem 'pg',"0.12.2"
end

2 个答案:

答案 0 :(得分:0)

看起来你在使用水龙头

时遇到了麻烦

尝试

bundle exec heroku db:push

你也可以尝试在gem“taps”中声明你的Gemfile。目前我正在使用:

taps (0.3.23)
heroku (2.6.1)

答案 1 :(得分:0)

您不能将heroku db:push与没有Heroku数据库一起使用。最好的方法是转储数据库,然后直接恢复到ClearDB实例。