taps migration failing from sqlite to postgres rails4, ruby 1.9.3

微笑、不失礼 提交于 2019-12-01 05:26:46
David Karlsson

This worked for me:

  1. I went up one directory from my project directory then did the following
  2. gem install taps
  3. gem uninstall rack
  4. gem install rack --version 1.0.1

Start the sqlite server from the project directory, in the 'one up directory' run:

taps pull postgres://f3@localhost/f3_development http://user:password@localhost:5000

Then did the migration as before and it worked. I had rack 1.5.2 installed so I had to remove that and replace it with rack 1.0.1. I'm using ruby 2.0.0-p0 and rails 4.0.0.beta1

It seems only the pull command needed the old version of rack so the server could run on the newer 1.5.2 version...

@David Karlsson's answer worked for me too. Except I had to update back rack once taps has completed the pull

gem update rack

and run bundle install to get back all my gems working.

I'm on rails 3.2 and ruby 1.9.3

Thank you @DavidKarlsson, just adding to your answer, there is no need to uninstall the existing rack. Following the recommendation of @hak8or in https://github.com/ricardochimal/taps/issues/128 I used a Gemfile to ensure usage of rack version 1.0.1. But after I installed I had various versions of rack

$ gem uninstall 'rack'

Select gem to uninstall:
1. rack-1.0.1
2. rack-1.4.4
3. rack-1.4.5
4. rack-1.5.2
5. All versions

and did not want to uninstall them, because that could affect other projects I have in the same machine. When I run taps it would use the latest, rack-1.5.2, so what I did was to run taps using bundle exec, in my case

bundle exec taps server sqlite://db/development.sqlite3 root root

Hope it helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!