Skip to content

Instantly share code, notes, and snippets.

@mariozig
Created December 4, 2011 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariozig/1428970 to your computer and use it in GitHub Desktop.
Save mariozig/1428970 to your computer and use it in GitHub Desktop.
Install the mysql2postgres gem
mario@red demo $ git clone https://github.com/maxlapshin/mysql2postgres.git
Cloning into mysql2postgres...
cd myremote: Counting objects: 516, done.
remote: Compressing objects: 100% (269/269), done.
remote: Total 516 (delta 262), reused 486 (delta 237)
Receiving objects: 100% (516/516), 84.68 KiB, done.
Resolving deltas: 100% (262/262), done.
mario@red demo $ cd mysql2postgres/
# Optional: I use RVM and wanted to use ruby 1.9.2
mario@red mysql2postgres $ rvm ruby-1.9.2-p290
mario@red mysql2postgres $ rake install
Successfully built RubyGem
Name: mysql2psql
Version: 0.1.0
File: mysql2psql-0.1.0.gem
Executing "ruby -S gem install ./pkg/mysql2psql-0.1.0.gem":
ruby -S gem install ./pkg/mysql2psql-0.1.0.gem
Successfully installed mysql2psql-0.1.0
1 gem installed
mario@red demo $
@alfredpl
Copy link

hi am getting following error please help

sysadmin@system8:~/mysql2postgres$ mysql-to-postgres
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in block in setup': You have already activated pg 0.9.0, but your Gemfile requires pg 0.17.0. Using bundle exec may solve this. (Gem::LoadError) from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:insetup'
from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in setup' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:inrescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in require' from /var/lib/gems/1.9.1/gems/mysql2psql-0.1.0/bin/mysql-to-postgres:5:in<top (required)>'
from /usr/local/bin/mysql-to-postgres:19:in load' from /usr/local/bin/mysql-to-postgres:19:in

'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment