Open sobrinho opened 10 years ago
I ran into the same problem. The gem does not appear to have the connection.rb file at all! It's missing.
Rather than using gem install mysqltopostgres
, add to your Gemfile:
gem 'mysqltopostgres', git: "https://github.com/maxlapshin/mysql2postgres.git"
Are you both using v0.2.15
?
I think so. I was using whatever was installed with gem install mysqltopostgres
which I believe is 0.2.15
, which looks quite old... :)
When using gem directly from this repo it worked fine. :)
Well let's keep this issue open until a new release is made.
@paazmaya this issue is still happening, could you release a new version? :)
I am experiencing the same issue, my details:
➜ dailyalbum.us git:(to_pg) ✗ cat Gemfile | grep -i mysqltopostgres
gem 'mysqltopostgres'
➜ dailyalbum.us git:(to_pg) ✗ gem list | grep -i mysqltopostgres
mysqltopostgres (0.2.15)
➜ dailyalbum.us git:(to_pg) ✗ mysqltopostgres
/Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/lib/mysql2psql/postgres_db_writer.rb:2:in `require': cannot load such file -- mysql2psql/connection (LoadError)
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/lib/mysql2psql/postgres_db_writer.rb:2:in `<top (required)>'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/lib/mysqltopostgres.rb:22:in `require'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/lib/mysqltopostgres.rb:22:in `<top (required)>'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/bin/mysqltopostgres:7:in `require'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/gems/mysqltopostgres-0.2.15/bin/mysqltopostgres:7:in `<top (required)>'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/bin/mysqltopostgres:23:in `load'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/bin/mysqltopostgres:23:in `<main>'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/bin/ruby_executable_hooks:15:in `eval'
from /Users/ericlondon/.rvm/gems/ruby-2.2.3@dailyalbum/bin/ruby_executable_hooks:15:in `<main>'
# then trying GH path in Gemfile:
➜ dailyalbum.us git:(to_pg) ✗ cat Gemfile | grep -i mysqltopostgres
gem 'mysqltopostgres', git: 'https://github.com/maxlapshin/mysql2postgres.git'
➜ dailyalbum.us git:(to_pg) ✗ bundle install
Updating https://github.com/maxlapshin/mysql2postgres.git
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
In snapshot (Gemfile.lock):
activerecord (= 4.1.8)
In Gemfile:
activerecord (= 4.1.8) ruby
mysqltopostgres (>= 0) ruby depends on
activerecord (~> 3.2) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
thanks
I got similar problem:
WARN: Unresolved specs during Gem::Specification.reset:
i18n (>= 0.6.4, ~> 0.6)
multi_json (~> 1.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/var/lib/gems/2.1.0/gems/mysqltopostgres-0.2.20/bin/mysqltopostgres:30:in <top (required)>': '' does not exist (RuntimeError) from /usr/local/bin/mysqltopostgres:23:in
load'
from /usr/local/bin/mysqltopostgres:23:in `
+1!
Same issue here. Would be good to release an updated gem with the latest changes!
This issue is very common
$ mysqltopostgres
/home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require': cannot load such file -- mysql2psql/connection (LoadError)
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysqltopostgres-0.2.15/lib/mysql2psql/postgres_db_writer.rb:2:in `<top (required)>'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysqltopostgres-0.2.15/lib/mysqltopostgres.rb:22:in `<top (required)>'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from /home/wilfried/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysqltopostgres-0.2.15/bin/mysqltopostgres:7:in `<top (required)>'
from /home/wilfried/.rbenv/versions/2.2.3/bin/mysqltopostgres:23:in `load'
from /home/wilfried/.rbenv/versions/2.2.3/bin/mysqltopostgres:23:in `<main>'
:+1:
Unfortunately I do not have the rights to publish... #85