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

kernel_require.rb:126:in `require': cannot load such file -- pg_ext (LoadError) #74

Open
joshco opened this issue Feb 20, 2015 · 8 comments
Labels

Comments

@joshco
Copy link

joshco commented Feb 20, 2015

Any idea why this is happening?
$ mysqltopostgres taps/config.yml

c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require':
cannot load such file -- pg_ext (LoadError)
        from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysqltopostgres-0.2.15/lib/mysqltopostgres.rb:7:in `<top (required)>'
        from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from c:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from c:/Ruby200/lib/ruby/gems/2.0.0/gems/mysqltopostgres-0.2.15/bin/mysqltopostgres:7:in `<top (required)>'
        from c:/Ruby200/bin/mysqltopostgres:23:in `load'
        from c:/Ruby200/bin/mysqltopostgres:23:in `<main>'
@paazmaya
Copy link
Contributor

It seems to be an older version of this tool, and the given error relates to the PostgreSQL gem not found in the context.
It should be already fixed in the master, there is just not a release yet...

@joshco
Copy link
Author

joshco commented Feb 20, 2015

I tried it by building it from the git repo. version shows 0.2.20 and I'm still seeing the same issue.
Im running Ruby 2.0.0 on windows
My rails apps work just fine with postgres.

@jibiel
Copy link
Contributor

jibiel commented Sep 3, 2015

mysql2postgres written in Ruby 1.9.3. And pg gem only specified for that platform at the moment:

platforms :mri_19 do
  gem 'pg', '~> 0.17'
end

Just update the platform to :mri_20 or anything you want.
You can even put gem 'pg' outside of the platforms block.

Then again

bundle install
gem build mysqltopostgres.gemspec
gem install mysqltopostgres-0.2.20.gem

@paazmaya
Copy link
Contributor

@jibiel would you like to make a PR for that fox?

@jibiel
Copy link
Contributor

jibiel commented Sep 20, 2015

@paazmaya You mean add the note to the dox or fix the Gemfile?

@paazmaya
Copy link
Contributor

Change the Gemfile...

@jibiel
Copy link
Contributor

jibiel commented Sep 23, 2015

That should it.

Also hard-coding ruby version with ruby 1.9.3 in Gemfile is not very friendly for a public library too. Especially given that the most of the current users tries to build gem from source and 1.9.3 will be ancient tomorrow. I'd use .ruby-version file convention.

For that same reason it'd be nice to do CI testing against multiple ruby versions.

@paazmaya
Copy link
Contributor

Thanks for the PR.
Would you like to work on the changes related to the Ruby version too?

@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

3 participants