# Disqus Import error

**URL:** https://meta.discourse.org/t/disqus-import-error/38932
**Category:** Migration
**Created:** [February 2, 2016, 10:25pm UTC](https://meta.discourse.org/t/disqus-import-error/38932 "2016-02-02T22:25:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MZainDamlag](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mzaindamlag/32/50721_2.png) [@MZainDamlag](https://meta.discourse.org/u/MZainDamlag)
#### Post date: [February 2, 2016, 10:25pm UTC](https://meta.discourse.org/t/disqus-import-error/38932/1 "2016-02-02T22:25:13Z")

</div>

Hello All  
I tried to run the disqus import script inside docker after some modification in the script and it run completely on development [local] and while I tried to run it inside docker

`bundle exec ruby script/import_scripts/disqus.rb --file=disqus.xml --threads=threads.csv --users=users.csv --post_as=archived-user --category=9`

I get this error:

```plaintext
URGENT: FATAL: Peer authentication failed for user "discourse"
 Failed to initialize site default /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize': FATAL: Peer authentication failed for user "discourse" (PG::ConnectionBad)

```

any help?

---

<div class="post-metadata">

### Author: ![MZainDamlag](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mzaindamlag/32/50721_2.png) [@MZainDamlag](https://meta.discourse.org/u/MZainDamlag)
#### Post date: [February 2, 2016, 10:38pm UTC](https://meta.discourse.org/t/disqus-import-error/38932/2 "2016-02-02T22:38:39Z")

</div>

And when I run `su - discourse`  
I get this error

> /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.5.1/lib/active\_record/connection\_adapters/postgresql\_adapter.rb:661:in `rescue in connect’: FATAL: database “discourse\_development” does not exist (ActiveRecord::NoDatabaseError)

---

<div class="post-metadata">

### Author: ![MZainDamlag](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mzaindamlag/32/50721_2.png) [@MZainDamlag](https://meta.discourse.org/u/MZainDamlag)
#### Post date: [February 2, 2016, 10:41pm UTC](https://meta.discourse.org/t/disqus-import-error/38932/3 "2016-02-02T22:41:41Z")

</div>

Thanks It’s run now after adding `RAILS_ENV=production` before the command after running this command `su - discourse`

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/disqus-import-error/38932/4 "2024-06-08T12:45:55Z")

</div>

This topic was automatically closed after 3048 days. New replies are no longer allowed.
