Fe_sendauth: No password supplied in bulk importer

I’ve been trying to use the bulk importer as described in Importers for large forums, but I’m having some trouble.

First off, the command to run the importer as described there is incorrect; after a lot of trial and error (I don’t know Ruby), turns out the command had to be prefixed with IMPORT=1 as well:

IMPORT=1 ruby script/bulk_import/vbulletin.rb

Second though, I’m getting an error when running the importer; looks like the import script isn’t supplying the Discourse database with a username / password?

/home/vagrant/.rvm/gems/ruby-2.3.1/gems/pg-0.20.0/lib/pg.rb:56:in `initialize': fe_sendauth: no password supplied (PG::ConnectionBad)
    from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/pg-0.20.0/lib/pg.rb:56:in `new'
	from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/pg-0.20.0/lib/pg.rb:56:in `connect'
	from /vagrant/script/bulk_import/base.rb:19:in `initialize'
	from script/bulk_import/vbulletin.rb:49:in `initialize'
	from script/bulk_import/vbulletin.rb:531:in `new'
	from script/bulk_import/vbulletin.rb:531:in `<main>'

I’ve looked at the code in base.rb and there’s no password supplied, but, does it have to? I’ve no clue how this works. Is the bulk import script broken or did I miss an important step somewhere?