# Error Trying to Start Import Process - Xenforo to Discourse

**URL:** <https://meta.discourse.org/t/error-trying-to-start-import-process-xenforo-to-discourse/43258>\
**Category:** Migration\
**Created:** [26. April 2016 um 17:35 UTC](https://meta.discourse.org/t/error-trying-to-start-import-process-xenforo-to-discourse/43258 "2016-04-26T17:35:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Overmind](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overmind/32/55446_2.png) [@Overmind](https://meta.discourse.org/u/Overmind)\
**Post date:** [26. April 2016 um 17:35 UTC](https://meta.discourse.org/t/error-trying-to-start-import-process-xenforo-to-discourse/43258/1 "2016-04-26T17:35:11Z")

</div>

Whenever I issue the command: RAILS\_ENV=production bundle exec ruby script/import\_scripts/xenforo.rb

I get:

```
/var/discourse/script/import_scripts/base.rb:14:in `require_relative': cannot load such file -- /var/discourse/config/environment (LoadError)
        from /var/discourse/script/import_scripts/base.rb:14:in `<top (required)>'
        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/xenforo.rb:3:in `<main>'

```

or

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

```

Been messing with the import process for a bit and am stumped, every time I find a solution to one aspect there seems to be another issues. Definitely not user friendly on imports yet. Hope to write a detailed step by step guide to importing Xenforo here for anyone that follows whenever I’m able to get it to work.

Xenforo Import Script: [discourse/script/import\_scripts/xenforo.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/script/import_scripts/xenforo.rb)

If anyone knows which steps to follow to start the import process that would be helpful. I couldn’t find anything related to the xenforo import steps other than what’s in that script.

---

_[View the full topic](https://meta.discourse.org/t/error-trying-to-start-import-process-xenforo-to-discourse/43258)._
