Issues while migrating from bbpress

(Tom Wells) #1

Is this thread still relevant? I see the discourse github page has several folders my install doesn’t have! I’m looking to import bbpress into discourse but coming across some issues.

Do I need the config folder and it’s contents for this to work or does this need to be on a completely fresh install? Currently I have Discourse up and running but it shouldn’t be an issue to reinstall it as even though it’s on a server, it’s not being used currently.

Any steer on this would be very helpful!

Migrating to Discourse from another Forum software
(Tom Wells) #2

Ok, this is the error I’m getting whenever I try running the script for bbpress! Tried everything :frowning:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mysql2 (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from script/import_scripts/bbpress.rb:3:in `<main>'

There’s something I’m missing I think. I’ve copied across the config and lib folders from the discourse github as they were missing on my install. I’ve put in my database details into bbpress.rb and I should have all the gems required installed. In short, I’m stumped! Been trying to get this to work for 2 days now :frowning:



(Régis Hanol) #3

You are missing the mysql2 gem. You should add “gem 'mysql2'” at the end of the Gemfile file and then run bundle install.

(Tom Wells) #4

Hi Zog, thanks for the reply.

I ran the docker install of discourse initially. However, when I check my gems using gem list all I have are:

bundler (1.3.5)
mysql2 (0.3.17)
net-http-persistent (2.9)
rdoc (3.9.4)
thor (

This is after installing bundler and mysql2 manually just now. Am I missing something? If I launch the discourse app it works perfectly well but I appear to be missing tons of gems!

(Tom Wells) #5

Update: Now getting this error: cannot load such file -- rails/all (LoadError) apparently missing the rails gem? So confused right now!

(Tom Wells) #6

Sorry to blast this thread with new posts, but I feel others may find this useful if they’re having the same issues as me (since I used the docker install on nginx etc).

I think I’ve made some progress, at least it feels like I have. I copied all the contents of the github repository into my discourse location (/var/discourse/) and rebuilt the app. I’m still getting an error but I can’t find much info on this from google.

/var/discourse/script/import_scripts/base.rb:14:in `<top (required)>': undefined method `require_dependency' for main:Object (NoMethodError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from script/import_scripts/bbpress.rb:5:in `<main>'

At a guess I’m missing something to define what ‘require_dependency’ is but then again I’m fairly new to ruby and rails so that’s more of an informed guess.

As always, any help would be absolutely smashing! I’m loving discourse so far and getting my bbpress forum imported is all I need to do now.

Thanks as always,


(Tom Wells) #7

Ok, I give up. There’s no instructions on how to actually import anything once you’ve installed discourse via docker. It seems not all of the gems required are installed by default and importing bbpress is critical for me and my community, we can’t simply start again from scratch.

Would removing discourse entirely and retrying help at all or will that not change anything? I feel if this can’t be resolved over the weekend I’ll have to try some other software (even though i love the way discourse works).

(Régis Hanol) #8

I would suggest you set up a development environment on your machine (or inside a virtual machine) and run the import there instead of inside the docker container. Then you will be able to create a backup and import it on your production instance.

(Tom Wells) #9

That wouldn’t be such a bad idea. Thanks again zog. As you can probably gather I’m getting a bit frustrated!

Any simple guides that will explain a good way to do so?

(Régis Hanol) #10


Not sure either of those is up to date though :frowning:

You should be fine following any recent tutorial on how to setup a development environment for Ruby on Rails using Postgresql and Redis. That’s pretty much all you need.

(Tom Wells) #11

Excellent thanks for your help. I’ll update this thread once I’ve figured everything out for anyone having similar issues in future. I’ve noticed a few other importers having issues with similar problems!



(Erlend Sogge Heggen) #12

We did a migration from bbPress (plugin) to Discourse for the forum. The devs who worked on it did a pretty good job of documenting their steps. Maybe that’ll be of some help. I’m afraid they’re too busy to do much followup.

(Tom Wells) #13

Many thanks erlend, that looks like it should do the trick! Much appreciated. I’ll give it a go tomorrow and let you know how I get on :smile:

(Tom Wells) #14

I’m still running into issues. I’m getting through 90% of the guide erlend provided (much appreciated again!) but then when I try bundle everything, it’s simply not working.

So, another approach. I have zipped my bbpress database, is there any chance at all that anyone can run this for me and provide me with a backup? I’m aware it could take some of your time so I’m willing to pay through paypal if necessary. I’m already going grey with this! :frowning:

(g0st) #15

Where is the GemFile?


I have just posted on how to import bbpress into discourse