bz2redmine - import error
Added by talari ganesh about 9 years ago
Hi,
I am trying to migrate from bugzilla to redmine and trying import bugzilla db using the script from https://github.com/ralli/bz2redmine. I am facing the following issue. Please help. I am using redmine 3.0 on CentOs.
[root@emb-redmine-bkp redmine]# ruby bug2redmine.rb
opening #<ConnectionInfo:0x00000000f631a0 @host="localhost", user user="embedded", asami morita="xxxx", @dbname="embedded"
#<NameError: uninitialized constant BugzillaToRedmine::Mysql>
bug2redmine.rb:98:in `open_connection'
bug2redmine.rb:86:in `open_connections'
bug2redmine.rb:66:in `migrate'
bug2redmine.rb:655:in `<main>'
Replies (1)
RE: bz2redmine - import error - Added by Most Leet almost 9 years ago
This is because the MySQL related Gem is not loaded, that is "mysql" and not the more recent "mysql2". You'll also need the net-ldap gem otherwise you'll get the following error once rerunning bug2redmine.rb after fixing the mysql gem issue:
[root@emb-redmine-bkp redmine]# ruby bug2redmine.rb
opening #<ConnectionInfo:0x00000000f631a0 @host="localhost", user user="embedded", asami morita="xxxx", @dbname="embedded"...
#<NameError: uninitialized constant BugzillaToRedmine::Net>
./bz2redmine.rb:186:in `migrate_users'
./bz2redmine.rb:71:in `migrate'
./bz2redmine.rb:655:in `<main>'
[root@emb-redmine-bkp redmine]#
To fix both of these issues do the following:
(1) Install the needed gem by running:
- gem install mysql
- gem install net-ldap
(2) Edit bz2redmine.rb to require the net-ldap gem:
#!/usr/bin/ruby #
- Copyright (c) 2009, Ralph Juhnke
- All rights reserved. #
...
require "rubygems"
require "mysql"
require "net/ldap"...
Not sure if this will be a properly sanctioned fix, but it worked for me.