# Installing mysql2 Gem for Flarum Import

**URL:** <https://meta.discourse.org/t/installing-mysql2-gem-for-flarum-import/317365>\
**Category:** Migration\
**Created:** [July 20, 2024, 11:35am UTC](https://meta.discourse.org/t/installing-mysql2-gem-for-flarum-import/317365 "2024-07-20T11:35:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ddeveloper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ddeveloper/32/333791_2.png) [@ddeveloper](https://meta.discourse.org/u/ddeveloper)\
**Post date:** [July 20, 2024, 11:35am UTC](https://meta.discourse.org/t/installing-mysql2-gem-for-flarum-import/317365/1 "2024-07-20T11:35:35Z")

</div>

I’ve no knowledge of Rails and hence, none that of discourse. I’m trying to migrate flarum database to discourse.

P.S: I’ve successfully installed discourse for production.

Right now, I’ve installed discourse docker from official git repository. When I try to run the import script in docker container:

```plaintext
su discourse -c 'bundle exec ruby script/import_scripts/flarum_import.rb'

```

I get this error:

```plaintext
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- mysql2 (LoadError)
from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'

```

I’ve tried all methods explained in different forum posts but none worked.  
If anyone could explain in 2-3 steps what to do to run ‘flarum\_import.rb’ import script, that’d be a great help.

---

_[View the full topic](https://meta.discourse.org/t/installing-mysql2-gem-for-flarum-import/317365)._
