Vanilla importer howto


(Ricardo Viteri) #1

Is there a howto for the vanilla importer? I’m fairly non technical… Thanks!


(Ricardo Viteri) #2

How do I run this script?


(Adnan) #3

Use these commands.

./launcher enter app
su discourse
cd /var/www/discourse
RAILS_ENV=production ruby script/import_scripts/vanilla.rb path/to/vanilla/exporter/file.txtxt

Follow the instruction on these two posts.


(Ricardo Viteri) #4

any ideas?

discourse@discourse:/var/www/discourse$ RAILS_ENV=production ruby script/import_scripts/vanilla.rb
/shared/becarios.txt

2014-09-22T07:43:30Z 547 TID-ov69eh9xw INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...
script/import_scripts/vanilla.rb:10:in `initialize': Vanilla file argument missing. Provide full path to vanilla csv file. (ArgumentError)
        from script/import_scripts/vanilla.rb:254:in `new'
        from script/import_scripts/vanilla.rb:254:in `<main>'

(Ricardo Viteri) #5

Figured out… I had pressed enter after RAILS_ENV=production ruby script/import_scripts/vanilla.rb