Disqus Import error

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-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?

1 Like

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)

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

6 Likes