简体   繁体   中英

Ruby on rails - migrate a db from SQLite to PostgresQL with taps

I am migrating a database from sqlite3 to PostgresQL with taps. I am trying to start the taps server on the sqlite database as follow

$ taps server sqlite://db/development.sqlite3 user password

However I got the following message thus I believe it didn't work well. Would you understand this kind of message as follow?

/Users/computer/.rvm/gems/ruby-2.4.0/gems/sequel-3.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Fixnum is deprecated
/Users/computer/.rvm/gems/ruby-2.4.0/gems/sequel-3.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Bignum is deprecated
/Users/computer/.rvm/gems/ruby-2.4.0/gems/sinatra-1.0/lib/sinatra/base.rb:298:in `<module:Templates>': uninitialized constant Tilt::CompileSite (NameError)
Did you mean?  Complex
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/sinatra-1.0/lib/sinatra/base.rb:297:in `<module:Sinatra>'
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/sinatra-1.0/lib/sinatra/base.rb:21:in `<top (required)>'
from /Users/computer/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/computer/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/taps-0.3.24/lib/taps/server.rb:1:in `<top (required)>'
from /Users/computer/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/computer/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/taps-0.3.24/lib/taps/cli.rb:61:in `server'
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/taps-0.3.24/lib/taps/cli.rb:27:in `run'
from /Users/computer/.rvm/gems/ruby-2.4.0/gems/taps-0.3.24/bin/taps:6:in `<top (required)>'
from /Users/computer/.rvm/gems/ruby-2.4.0/bin/taps:22:in `load'
from /Users/computer/.rvm/gems/ruby-2.4.0/bin/taps:22:in `<main>'
from /Users/computer/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/computer/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'

You'll have to force a lower version of tilt, I'd try tilt 0.8, since that was the most recent version of tilt when sinatra 1.0 was released. Note that taps is a dead project, you should probably consider migrating to something else. You could try:

sequel -C sqlite://db/development.sqlite3 postgres://user:password@host/database

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM