mysql2postgres
mysql2postgres copied to clipboard
kernel_require.rb:126:in `require': cannot load such file -- pg_ext (LoadError)
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>'
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...
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.
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
@jibiel would you like to make a PR for that fox?
@paazmaya You mean add the note to the dox or fix the Gemfile
?
Change the Gemfile
...
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.
Thanks for the PR. Would you like to work on the changes related to the Ruby version too?