Problem Importing mailman archive into Discourse

(Matthew Needham) #1

I’m following the how-to at HOWTO: Import MBOX (mailing list) files.

In the very first comment, the user reports an error that I’m also seeing. The response is to “add sqlite to the Gemfile and [run] bundle install”. The was from Nov 2016, so maybe it’s already been added in source. The end of the gemfile does already contain:

if ENV["IMPORT"] == "1"
  gem 'mysql2'
  gem 'redcarpet'
  gem 'sqlite3', '~> 1.3.13'
  gem 'ruby-bbcode-to-md', github: 'nlalonde/ruby-bbcode-to-md'

Nevertheless, I copied the line w/ sqlit3 up a few lines, and ran bundle install. It was successful, but I’m still seeing the same error.

Bundle complete! 110 Gemfile dependencies, 185 gems now installed.
Gems in the group development were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

root@ip-10-0-0-12-app:/var/www/discourse# bundle exec script/import_scripts/mbox.rb
script/import_scripts/mbox.rb: 1: script/import_scripts/mbox.rb: require: not found
script/import_scripts/mbox.rb: 2: script/import_scripts/mbox.rb: Syntax error: "(" unexpected

This is probably super simple for anyone who knows anything about this. This is my first exposure to Discourse, Docker (anything but the Linux/Mailman side), and I’m likely stumbling over some detail too obvious to bother documenting.

I’m running this on AWS, using the guide at Discourse setup using AWS | andrew stroup’s Blog, with additional hints from places to which I lack the TrustLevel to link. After seeing how much this cost on AWS running idle, I set up a Discourse Droplet on DigitalOcean. The plan is that once we have a fully functional prototype on AWS, I’ll recreate the config steps on DO and we’ll go live.


Importing mailing lists (mbox, Listserv, emails, ...)
(Gerhard Schlager) #3

It looks like you are trying to use the mbox import script within a Docker container. The how-to you are following assumes that you run the importer in a development environment instead of a Docker container. That’s why you are seeing these problems.

Also, I’d suggest you use the “experimental” import script instead – despite it’s name it’s quite stable. I didn’t have the time to fully document it yet, but it should work a lot better than the old script. Take a look at the following guide I just posted: Importing mailing lists (mbox, Listserv, emails, ...)

If you are still having problems, feel free to ask. It will help me improve the guide. After all it’s just a first draft…