Import from Vanilla Failing (Multiple errors)


(Mark McDowall) #1

I’m hoping to replace my existing Vanilla 2 forums with Discourse, but I’m having a couple errors when I attempt to import from a Vanilla Export, I’ve followed the steps in this thread: [Paid] Need a Vanilla 2 Import tool

The first issue I ran into was:

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:50:in `rescue in _assign_attribute': unknown attribute: bio_raw (ActiveRecord::UnknownAttributeError)
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:45:in `_assign_attribute'

I cheated a bit and commented out the bio_raw in vanilla.thor which got me part way through importing the topics (~800 of ~1200) and into this error:

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `get_last_result': PG::Error: ERROR:  duplicate key value violates unique constraint "cat_featured_threads"
 (ActiveRecord::RecordNotUnique)
DETAIL:  Key (category_id, topic_id)=(5, 597) already exists.
: INSERT INTO "category_featured_topics" ("category_id", "created_at", "rank", "topic_id", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `block in exec_cache'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `exec_cache'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:138:in `exec_query'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:177:in `exec_insert'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:95:in `insert'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/relation.rb:64:in `insert'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:502:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:87:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `block in _create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:82:in `run_callbacks'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:103:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:51:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:21:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in
 `block (2 levels) in save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in
 `block in with_transaction_returning_status'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in
 `with_transaction_returning_status'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in
 `block in save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:283:in
 `rollback_active_record_state!'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:267:in
 `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/has_many_association.rb:40:in `insert_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:462:in `block (2 levels) in _create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:389:in `add_to_target'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:460:in `block in _create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:168:in `block in transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:167:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:459:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_association.rb:137:in `create'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/associations/collection_proxy.rb:285:in `create'
        from /var/www/discourse/app/models/category_featured_topic.rb:32:in `block (2 levels) in feature_topics_for'
        from /var/www/discourse/app/models/category_featured_topic.rb:31:in `each'
        from /var/www/discourse/app/models/category_featured_topic.rb:31:in `each_with_index'
        from /var/www/discourse/app/models/category_featured_topic.rb:31:in `block in feature_topics_for'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/app/models/category_featured_topic.rb:28:in `feature_topics_for'
        from /var/www/discourse/app/models/topic.rb:467:in `block in changed_to_category'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/app/models/topic.rb:453:in `changed_to_category'
        from /var/www/discourse/app/models/topic.rb:163:in `block in <class:Topic>'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `instance_exec'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `block in make_lambda'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:221:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:221:in `block in halting_and_conditional'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/persistence.rb:103:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/validations.rb:51:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:21:in `save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in
 `block (2 levels) in save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in
 `block in with_transaction_returning_status'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in
 `with_transaction_returning_status'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in
 `block in save'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:283:in
 `rollback_active_record_state!'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:267:in
 `save'
        from /var/www/discourse/lib/topic_creator.rb:102:in `save_topic'
        from /var/www/discourse/lib/topic_creator.rb:20:in `create'
        from /var/www/discourse/lib/post_creator.rb:171:in `setup_topic'
        from /var/www/discourse/lib/post_creator.rb:58:in `block in create'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in
 `transaction'
        from /var/www/discourse/lib/post_creator.rb:57:in `create'
        from /var/www/discourse/lib/tasks/vanilla.thor:198:in `block in create_topics'
        from /var/www/discourse/lib/tasks/vanilla.thor:186:in `each'
        from /var/www/discourse/lib/tasks/vanilla.thor:186:in `create_topics'
        from /var/www/discourse/lib/tasks/vanilla.thor:26:in `import'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `load'
        from /var/www/discourse/vendor/bundle/ruby/2.0.0/bin/thor:23:in `<main>'

Please let me know if I can provide any more information to assist.


(Sam Saffron) #2

This moved to to another table, I guess our import script needs updating @zogstrip?


(Jonas Friedmann) #3

Yup, same issue for me:

[vagrant@precise32:/vagrant (master)]$ thor vanilla:import -f shared/vanilla.txt

WARNING: --------------------------------------------------------------------------
You are running an old version of bundler, please update by running: gem install bundler

loading rails...
2014-07-17T09:56:01Z 29227 TID-14mou4 INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
reading file...
parsing activities...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_meta...
parsing user_roles...
disabling rate limiter...
creating users...
enabling rate limiter...
/usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:50:in `rescue in _assign_attribute': unknown attribute: bio_raw (ActiveRecord::UnknownAttributeError)
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:45:in `_assign_attribute'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:32:in `block in assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `each'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:455:in `init_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:198:in `initialize'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:39:in `create!'
	from /vagrant/lib/tasks/vanilla.thor:90:in `block in create_users'
	from /vagrant/lib/tasks/vanilla.thor:86:in `each'
	from /vagrant/lib/tasks/vanilla.thor:86:in `create_users'
	from /vagrant/lib/tasks/vanilla.thor:22:in `import'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'
[vagrant@precise32:/vagrant (master)]$unknown attribute: bio_raw 

(Jens Maier) #4

I’ve hacked up a quick fix:

https://github.com/Elberet/discourse/commit/6c69526d726186cce08159b9a6d0dd324b9cdca2

It’s really just a hack, though and completely untested. I don’t have a Vanilla instance available to me. Also, I’m guessing the Thor script will be migrated to the importer style sooner or later – waiting for that to happen is definitely the better idea.


(Jonas Friedmann) #5

Nice, but now i stuck with this:

WARNING: --------------------------------------------------------------------------
You are running an old version of bundler, please update by running: gem install bundler

/usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/util.rb:155:in `class_eval': /vagrant/lib/tasks/vanilla.thor:99: syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError)
          user[:new_id] u.id
                         ^
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/util.rb:155:in `load_thorfile'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:214:in `block in initialize_thorfiles'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:213:in `each'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:213:in `initialize_thorfiles'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:32:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'

(Jens Maier) #6

Yeah I typo’ed. Told ya it was completely untested… :grin:
Just add a = in line 99 before u.id or see here: https://github.com/Elberet/discourse/compare/fix-vanilla-import


(Jonas Friedmann) #7

Ah, you’re right. Also it looked really promising after i adjusted that line.

However after about 1 hour, my shell timed out and i lost connection to the docker image, so i have to redo the migration tomorrow. I’ll let you know :smile:


(Jens Maier) #8

Sounds like you really want to read this:

The tl;dr version:

  • sudo apt-get install screen installs the screen tool (on Ubuntu and Debian systems).
  • screen starts a shell in a new screen session.
  • Ctrl+A, d detaches your terminal (i.e. the SSH session) from the screen and brings you back to where you first ran screen. You can run other stuff, start more screens, or just close the terminal.
  • screen -r brings the session back. Once you exit the shell that screen initially started for you, screen itself terminates.
  • If there’s more then one screen running, the -r command requires a name. Use screen -ls to get a list of running screens. Or start your screen session with -S name to give it a custom name.

(Jonas Friedmann) #9

Thanks, but no need to. I’m familiar with screen, I just wasn’t aware that the import could take that long :slight_smile:


(Jens Maier) #10

Ah okay, sorry. I’ve just gotten used to run almost everything that isn’t guaranteed to be resumable in a screen after I got burned by an interrupted system update that nearly killed my home server a couple years back… :grin:


(Jonas Friedmann) #11

I guess I should let become this a habit as well. :grin:


(Jonas Friedmann) #12

Not sure why, but as i tried it today, i stuck with the following error:

creating users...
enabling rate limiter...
/usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:50:in `rescue in _assign_attribute': unknown attribute: new_since (ActiveRecord::UnknownAttributeError)
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:45:in `_assign_attribute'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:32:in `block in assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `each'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_assignment.rb:26:in `assign_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:455:in `init_attributes'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/core.rb:198:in `initialize'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/inheritance.rb:30:in `new'
	from /vagrant/app/models/user.rb:655:in `create_user_stat'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:424:in `block in make_lambda'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:221:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:221:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:125:in `save!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:57:in `save!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `block in save!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:273:in `save!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:41:in `create!'
	from /vagrant/lib/tasks/vanilla.thor:90:in `block in create_users'
	from /vagrant/lib/tasks/vanilla.thor:86:in `each'
	from /vagrant/lib/tasks/vanilla.thor:86:in `create_users'
	from /vagrant/lib/tasks/vanilla.thor:22:in `import'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'

(Jens Maier) #13

Huh, that one’s weird. Did you recently git pull but forgot to rake db:migrate?

Maybe you should just wait a bit until Neil has ported the old Vanilla importer to the new style scripts…


(Jonas Friedmann) #14

That did the trick!

Unfortunately now I stuck with this error:

[vagrant@precise32:/vagrant (fix-vanilla-import)]$ thor vanilla:import -f shared/export.txt

WARNING: --------------------------------------------------------------------------
You are running an old version of bundler, please update by running: gem install bundler

loading rails...
2014-07-19T18:58:33Z 28208 TID-19g5ze INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
reading file...
parsing activities...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_meta...
parsing user_roles...
disabling rate limiter...
creating users...
created 695 users!
creating user memberships...
granting admin rights...
3 admins!
granting moderation rights...
4 moderators!
creating categories...
created 24 categories!
creating topics...
enabling rate limiter...
at validateAttribute (/vagrant/app/assets/javascripts/discourse/lib/markdown.js:31:40): Cannot call method 'indexOf' of undefined (PrettyText::JavaScriptError)
	from at sanitizeAttribs (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:2060:32)
	from at /vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:2169:32
	from at makeSaxParser.startTag (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:1860:24)
	from at parseStartTag (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:1719:9)
	from at parseCPS (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:1573:21)
	from at parse (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:1501:5)
	from at /vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:1464:14
	from at sanitizeWithPolicy (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:2201:33)
	from at sanitize (/vagrant/app/assets/javascripts/defer/html-sanitizer-bundle.js:2216:12)
	from at Discourse.Markdown.sanitize (/vagrant/app/assets/javascripts/discourse/lib/markdown.js:198:19)
	from at Discourse.Dialect.cook (/vagrant/app/assets/javascripts/discourse/dialects/dialect.js:161:35)
	from at makeHtml (/vagrant/app/assets/javascripts/discourse/lib/markdown.js:212:34)
	from at <eval>:1:44
	from /vagrant/lib/pretty_text.rb:152:in `block in markdown'
	from /vagrant/lib/pretty_text.rb:299:in `block in protect'
	from /vagrant/lib/pretty_text.rb:297:in `synchronize'
	from /vagrant/lib/pretty_text.rb:297:in `protect'
	from /vagrant/lib/pretty_text.rb:133:in `markdown'
	from /vagrant/lib/pretty_text.rb:172:in `cook'
	from /vagrant/app/models/post_analyzer.rb:12:in `cook'
	from /vagrant/app/models/post.rb:144:in `cook'
	from /vagrant/lib/post_creator.rb:100:in `before_create_tasks'
	from /vagrant/app/models/post.rb:357:in `block in <class:Post>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `instance_exec'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `block in make_lambda'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:160:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:160:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:103:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:51:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:21:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in `block (2 levels) in save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in `block in save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:283:in `rollback_active_record_state!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:267:in `save'
	from /vagrant/lib/post_creator.rb:225:in `save_post'
	from /vagrant/lib/post_creator.rb:61:in `block in create'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction'
	from /vagrant/lib/post_creator.rb:57:in `create'
	from /vagrant/lib/tasks/vanilla.thor:200:in `block in create_topics'
	from /vagrant/lib/tasks/vanilla.thor:188:in `each'
	from /vagrant/lib/tasks/vanilla.thor:188:in `create_topics'
	from /vagrant/lib/tasks/vanilla.thor:26:in `import'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'
[vagrant@precise32:/vagrant (fix-vanilla-import)]$

Not sure if you know what’s the issue there. Maybe I should just wait till @neal fixed the native importer.


(Jens Maier) #15

I have a sneaking suspicion that this might actually be a bug in markdown.js. Hard to tell without a repro, tho. Too bad that the import script bails out instead of logging which post failed and why.


(Jonas Friedmann) #16

Yep, but I was lucky and found the discussion by @codetaylor where he pointed out he fixed that issue. So I stalked him went to his GitHub profile and found a fork and the following commit:

https://github.com/codetaylor/discourse/commit/df2c2598361f186f8a00e35b6f665f693998bccd

Too good to be true, the import was running for about 40 minutes, then I got the following error message:

[vagrant@precise32:/vagrant (fix-vanilla-import)]$ thor vanilla:import -f shared/export.txt

WARNING: --------------------------------------------------------------------------
You are running an old version of bundler, please update by running: gem install bundler

loading rails...
2014-07-20T15:20:11Z 24435 TID-175gsi INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
reading file...
parsing activities...
parsing categories...
parsing comments...
parsing conversations...
parsing conversation_messages...
parsing discussions...
parsing permissions...
parsing roles...
parsing users...
parsing user_conversations...
parsing user_discussions...
parsing user_meta...
parsing user_roles...
disabling rate limiter...
creating users...
created 689 users!
creating user memberships...
granting admin rights...
3 admins!
granting moderation rights...
4 moderators!
creating categories...
created 24 categories!
creating topics...
created 1671 topics!
creating posts...
could not find discussion #1549
could not find discussion #1549
could not find discussion #1600
could not find discussion #1600
could not find discussion #1602
could not find discussion #1604
could not find discussion #1606
could not find discussion #1642
could not find discussion #1696
could not find discussion #1702
enabling rate limiter...
/vagrant/lib/pretty_text.rb:152:in `block in markdown': Script Timed Out (PrettyText::JavaScriptError)
	from /vagrant/lib/pretty_text.rb:299:in `block in protect'
	from /vagrant/lib/pretty_text.rb:297:in `synchronize'
	from /vagrant/lib/pretty_text.rb:297:in `protect'
	from /vagrant/lib/pretty_text.rb:133:in `markdown'
	from /vagrant/lib/pretty_text.rb:172:in `cook'
	from /vagrant/app/models/post_analyzer.rb:12:in `cook'
	from /vagrant/app/models/post.rb:144:in `cook'
	from /vagrant/lib/post_creator.rb:100:in `before_create_tasks'
	from /vagrant/app/models/post.rb:357:in `block in <class:Post>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `instance_exec'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:438:in `block in make_lambda'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:160:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:160:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:306:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/timestamp.rb:57:in `_create_record'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:482:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `block in create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:113:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:166:in `block in halting'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `call'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activesupport-4.1.4/lib/active_support/callbacks.rb:86:in `run_callbacks'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/callbacks.rb:302:in `create_or_update'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/persistence.rb:103:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/validations.rb:51:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/attribute_methods/dirty.rb:21:in `save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in `block (2 levels) in save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:268:in `block in save'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:283:in `rollback_active_record_state!'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:267:in `save'
	from /vagrant/lib/post_creator.rb:225:in `save_post'
	from /vagrant/lib/post_creator.rb:61:in `block in create'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/activerecord-4.1.4/lib/active_record/transactions.rb:208:in `transaction'
	from /vagrant/lib/post_creator.rb:57:in `create'
	from /vagrant/lib/tasks/vanilla.thor:230:in `block in create_posts'
	from /vagrant/lib/tasks/vanilla.thor:213:in `each'
	from /vagrant/lib/tasks/vanilla.thor:213:in `create_posts'
	from /vagrant/lib/tasks/vanilla.thor:27:in `import'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/runner.rb:36:in `method_missing'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:29:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/command.rb:126:in `run'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/gems/thor-0.19.1/bin/thor:6:in `<top (required)>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `load'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/thor:23:in `<main>'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `eval'
	from /usr/local/rvm/gems/ruby-2.0.0-p0-turbo/bin/ruby_noexec_wrapper:14:in `<main>'
[vagrant@precise32:/vagrant (fix-vanilla-import)]$

(Régis Hanol) #17

Just letting you know that I just push our new vanilla importer :slight_smile:

https://github.com/discourse/discourse/commit/d0095ce0415bd7cb77998dd37269752dc6988135

You will need to export your vanilla forum using Vanilla Porter and then run:

cd /var/www/discourse
ruby script/import_scripts/vanilla.rb path/to/vanilla/exporter/file.txt