无法使用heroku db:push将数据库推送到Heroku

时间:2013-05-21 14:54:21

标签: database heroku

因此,由于某种原因,我无法将本地数据库推送到Heroku。我认为它正在尝试在sqlite3中加载开发数据库,​​即使我在我的Gemfile中为生产环境设置了postgresql。想知道如何解决这个问题?

错误讯息:

Sending schema
C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/sche
ma.rb:17:in `dump_table'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/bin/schema:32
:in `<main>'
C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/sche
ma.rb:17:in `dump_table'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/bin/schema:32
:in `<main>'
C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/sche
ma.rb:17:in `dump_table'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/bin/schema:32
:in `<main>'
C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/sche
ma.rb:17:in `dump_table'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/bin/schema:32
:in `<main>'
Schema:        100% |==========================================| Time: 00:00:07
C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/sche
ma.rb:39:in `indexes_individual'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/bin/schema:36
:in `<main>'
 !    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.24/lib/vendo
r/okjson.rb:82:in `valparse'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/vendo
r/okjson.rb:64:in `textparse'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/vendo
r/okjson.rb:43:in `decode'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
operation.rb:419:in `push_indexes'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
operation.rb:408:in `block in run'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
operation.rb:203:in `call'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
operation.rb:203:in `catch_errors'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
operation.rb:405:in `run'
                 C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.24/lib/taps/
cli.rb:172:in `clientxfer'
                 C:/Users/ptuan008/.heroku/client/lib/heroku/command/db.rb:192:i
n `taps_client'
                 C:/Users/ptuan008/.heroku/client/lib/heroku/command/db.rb:30:in
 `push'
                 C:/Users/ptuan008/.heroku/client/lib/heroku/command.rb:206:in `
run'
                 C:/Users/ptuan008/.heroku/client/lib/heroku/cli.rb:28:in `start
'
                 C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'

    Command:     heroku db:push
    Version:     heroku/toolbelt/2.39.3 (i386-mingw32) ruby/1.9.3

0 个答案:

没有答案