maxlapshin / mysql2postgres

Mysqldump, writing in postgresql format
MIT License
709 stars 156 forks source link

heroku mysqltopostgres installation error #93

Open andychan94 opened 8 years ago

andychan94 commented 8 years ago

I am trying to deploy my php app that uses mysql db to heroku. I followed instructions here -

The sudo gem install mysqltopostgres-0.3.0.gem command executed without errors:

gem build mysqltopostgres.gemspec

Successfully built RubyGem

Name: mysqltopostgres

Version: 0.3.0

File: mysqltopostgres-0.3.0.gem

but when I try to execute the mysqltopostgres command, the following errors occur:

mysqltopostgres /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:34:in 'block in setup': You have already activated test-unit 2.5.5, but your Gemfile requires test-unit 3.2.1. Prepending 'bundle exec' to your command may solve this. (Gem::LoadError) from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:19:in 'setup' from /usr/lib/ruby/vendor_ruby/bundler.rb:92:in 'setup' from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:8:in '' from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require' from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require' from /var/lib/gems/2.3.0/gems/mysqltopostgres-0.3.0/bin/mysqltopostgres:5:in '' from /usr/local/bin/mysqltopostgres:22:in 'load' from /usr/local/bin/mysqltopostgres:22:in ''

I then tried to prepend bundle exec:

bundle exec mysqltopostgres /usr/local/lib/site_ruby/2.3.0/rubygems.rb:270:in 'find_spec_for_exe': can't find gem mysqltopostgres (>= 0.a) (Gem::GemNotFoundException) from /usr/local/lib/site_ruby/2.3.0/rubygems.rb:298:in 'activate_bin_path' from /usr/local/bin/mysqltopostgres:22:in ''

Heroku devs told me post an issue here. Thanks in advance

joaocsilva commented 8 years ago

+1

fa11enangel commented 8 years ago

Don't run the command in the "mysql2postgres/" directory, where you've built mysql2postgres. Run it outside, where your configuration yaml file is located.

Hotinly commented 7 years ago

I have installed 'mysqltopostgres-0.3.0.gem' successfully, but when I execute the mysqltopostgres command(In my Project/config dir, where database.yml file located ), I got errors: /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in 'to_specs': Could not find mysqltopostgres (>= 0) amongst [actionmailer-4.2.5.1, actionpack-4.2.5.1, actionview-4.2.5.1, activejob-4.2.5.1, activemodel-4.2.5.1, activerecord-4.2.5.1, ..... web-console-2.3.0, will_paginate-3.1.5] (Gem::LoadError) from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in 'to_spec' from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in 'gem' from /usr/local/bin/mysqltopostgres:22:in '<main>'