Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load such file -- mysql2psql/connection #66

Open
sobrinho opened this issue Nov 11, 2014 · 12 comments
Open

cannot load such file -- mysql2psql/connection #66

sobrinho opened this issue Nov 11, 2014 · 12 comments
Labels

Comments

@sobrinho
Copy link

/vagrant/mysql2postgres (2.1.3p242) 
λ mysqltopostgres 
/usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- mysql2psql/connection (LoadError)
        from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /var/lib/gems/2.1.0/gems/mysqltopostgres-0.2.15/lib/mysql2psql/postgres_db_writer.rb:2:in `<top (required)>'
        from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /var/lib/gems/2.1.0/gems/mysqltopostgres-0.2.15/lib/mysqltopostgres.rb:22:in `<top (required)>'
        from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /var/lib/gems/2.1.0/gems/mysqltopostgres-0.2.15/bin/mysqltopostgres:7:in `<top (required)>'
        from /usr/local/bin/mysqltopostgres:23:in `load'
        from /usr/local/bin/mysqltopostgres:23:in `<main>'
@leonardteo
Copy link

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"

@paazmaya
Copy link
Contributor

paazmaya commented Dec 9, 2014

Are you both using v0.2.15 ?

@leonardteo
Copy link

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. :)

@paazmaya
Copy link
Contributor

paazmaya commented Dec 9, 2014

Well let's keep this issue open until a new release is made.

@sobrinho
Copy link
Author

@paazmaya this issue is still happening, could you release a new version? :)

@EricLondon
Copy link

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

@jac0511
Copy link

jac0511 commented Oct 13, 2015

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:inload'
from /usr/local/bin/mysqltopostgres:23:in `

'

@fastf0rward
Copy link

+1!

@brchristian
Copy link

Same issue here. Would be good to release an updated gem with the latest changes!

@psddp
Copy link

psddp commented Jan 29, 2016

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>'

@yuvadm
Copy link

yuvadm commented Apr 14, 2016

👍

@paazmaya
Copy link
Contributor

Unfortunately I do not have the rights to publish... #85

@paazmaya paazmaya added the bug label Aug 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants