How to run the import scripts? Halp?

(Mikkel Høgh) #1

I have been trying to wrap my head around how to run those import scripts that come with Discourse, but without insight into the world of Ruby on Rails, it’s proving difficult. I’m trying to import data from a Drupal site, using script/import_scripts/drupal.rb. I’ve edited it with the right connection info for my MySQL database, and I’ve tried to run it in different ways. I think something like this ought to work?

bundle exec ruby script/import_scripts/drupal.rb

However, that gives me this error:

script/import_scripts/drupal.rb:3:in `require': cannot load such file -- mysql2 (LoadError)
    from script/import_scripts/drupal.rb:3:in `<main>'

I’ve tried working around that with a bundle exec gem install mysql2, but that seems to make no difference at all, even though it insists that the gem is now installed.

What am I doing wrong?

(Kane York) #2

I think you’re supposed to run the import scripts without bundler?

(Arpit Jalan) #3

This howto may help: