Disqus Import error

(M Zain Damlag) #1

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:

URGENT: FATAL:  Peer authentication failed for user "discourse"
 Failed to initialize site default /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord- `initialize': FATAL:  Peer authentication failed for user "discourse" (PG::ConnectionBad)

any help?

(M Zain Damlag) #2

And when I run su - discourse
I get this error

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord- `rescue in connect’: FATAL: database “discourse_development” does not exist (ActiveRecord::NoDatabaseError)

(M Zain Damlag) #3

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