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
当我尝试在Cedar堆栈上将SQLite3推送到Postgresql(通过Taps)时,为什么会出现这个错误?_Postgresql_Heroku_Ruby On Rails 3.1_Taps - Fatal编程技术网

当我尝试在Cedar堆栈上将SQLite3推送到Postgresql(通过Taps)时,为什么会出现这个错误?

当我尝试在Cedar堆栈上将SQLite3推送到Postgresql(通过Taps)时,为什么会出现这个错误?,postgresql,heroku,ruby-on-rails-3.1,taps,Postgresql,Heroku,Ruby On Rails 3.1,Taps,我对Heroku开发中心做了很多研究,现在我希望社区能提供帮助。这是我的问题。我不能把我的数据库推到Heroku Cedar堆栈。我正在尝试通过Taps gem将sqlite数据库迁移到postgresql。当我准备部署时,我运行: bundle install --without production heroku run db:push 我得到以下结果: Running db:seed attached to terminal... up, run.17 sh: db:seed: not

我对Heroku开发中心做了很多研究,现在我希望社区能提供帮助。这是我的问题。我不能把我的数据库推到Heroku Cedar堆栈。我正在尝试通过Taps gem将sqlite数据库迁移到postgresql。当我准备部署时,我运行:

bundle install --without production
heroku run db:push
我得到以下结果:

Running db:seed attached to terminal... up, run.17
sh: db:seed: not found
heroku run rake db:migrate
当我运行迁移时:

heroku run rake db:migrate
我得到以下信息:

Running rake db:migrate attached to terminal... up, run.18
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/local/lib/ruby/1.9.1/rake.rb:2367:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'
没有创意。请帮忙。如果有用的话,我可以发布gemfile、heroku ps和日志的结果

干杯

更新:按照@John的指示,我现在收到以下终端消息

Sending schema
Schema:        100% |==========================================| Time: 00:00:07
Sending indexes
schema_migrat: 100% |==========================================| Time: 00:00:00
Sending data
4 tables, 6 records
schema_migrat:   0% |                                          | ETA:  --:--:--
Saving session to push_201111070749.dat..
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: LoadError: no such file to load -- sequel/adapters/
及下列警告:


[“/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in
require”“,/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/gems/sequel-3.20.0/lib/sequel/core.0/core.249:in
in
in/u-require'”,/app/.app/.bundle/gems/gems/sequel/ruby/1.9.1.0/sequel/3.20.0/core/rb:72:inin,“/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:69:in
check_requirement_thread'”、/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:249:in
tsk_require'”、/app/.bundle/gems/ruby/1.9.1.1.9.1/gems/sequel-3.20.0/lib/sequel/database/core:25:in class>/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:54:in
connect'”、/app/.bundle/gems/ruby/1.9.1/gems/sequel-3.20.0/lib/sequel/core.rb:119:in
connect'、/app/lib/taps/db_session.rb:14:in
conn'、/app/lib/taps/server.rb:91:in
block-in'”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:in
call'“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:865:in
block-in-in-route'”/app/.bundle/gems/gems/ruby/1.9.1/lib/sinatra/base.rb:521:in
实例”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
route_eval',“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500:in
route中的块(2层)”,“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.7:in
/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in
block-in-route!”,“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:in
each”“,/app/.bundle/gems/ruby/1.9.1/lib/sinatra/base.rb:in
route!”,”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:601:in
dispatch!”,“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in
block-in-in-call!”,“/app/.bundle/gems/ruby/1.9.1/gems/sinatra/base.rb:566:in
实例”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
block in invoke'”、/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
catch'、/app/.bundle/gems/gems/ruby/1.9.1/lib/sinatra/base.rb:566:in
invoke'”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:411:in
call!”,“/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399:in
call'”,/app/.bundle/gems/ruby/1.9.1/gems/rack/auth/basic.rb:25:in
call'”/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:in
block-in call'”、/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/gems/sinatra-1.0/lib/sinatra/base.rb/sinatra/base.979:incall'、
home/lib/lu/lu/u>/home/heroku_rack/lib/last_access.rb:15:in
call'”/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in
block-in调用“,/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in
each'”,/app/.app/.gems/ruby/1.9.1.1.1.1/rack/urlmap.41:/home/heroku_rack/lib/date_header.rb:14:incall'”/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:77:in
call'”/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:76:in
pre\u过程中的block'”/app/.app/.gems/gems/ruby/1.9.1.1.1.1/gems/thin/lib:74:connection,“
/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in
preêprocess'“,/app/.bundle/gems/ruby/1.9.1/gems/gems/thin-1.2.7/lib/thin/connection.rb:42:in接收ê数据”/app/.bundle/gems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run\u machine'”、/app/.bundle/gems/ruby/1.9.1/gems/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'、/app/.bundle/gems/gems/ruby/1.9.1.2.7/lib/thin/backends/base.rb:57:in
start'”/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/server.rb:156:in
start'”、/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/gems/thin/thin/controllers/controllers.rb:80:in
start'、/app/.bundle/gems/gems/ruby/1.9.1.2.7/lib/thin/runner.rb:177:in
run命令/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:143:in
run!',“/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/bin/thin:6:in
”,“/usr/ruby1.9.2/bin/thin:19:in
load'”,“/usr/ruby1.9.2/bin/thin:19:in

首先是推送命令

heroku db:push
不通过heroku run运行

我怀疑您的Sqlite问题(可能是?)归根结底是推送分支的语法——要将分支推送到heroku,您必须这样做

git push heroku branchname:master
也就是说,将my推送到heroku remote上的主分支。如果你真的在做
git push heroku branchname
你实际上没有部署任何东西,因为heroku只会部署主分支,所以你可以在代码中进行更改,推送-但实际上不会影响部署的代码。虽然
git push heroku branchname:master
heroku create
git push heroku master