# Exception during restore: EXCEPTION: undefined method \`\[\]' for nil:NilClass

**URL:** <https://meta.discourse.org/t/exception-during-restore-exception-undefined-method-for-nil-nilclass/34019>\
**Category:** Product Support\
**Created:** [2015 年 10 月 1 日午後 10:47 UTC](https://meta.discourse.org/t/exception-during-restore-exception-undefined-method-for-nil-nilclass/34019 "2015-10-01T22:47:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ckamps](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@ckamps](https://meta.discourse.org/u/ckamps)\
**Post date:** [2015 年 10 月 2 日午前 11:54 UTC](https://meta.discourse.org/t/exception-during-restore-exception-undefined-method-for-nil-nilclass/34019/4 "2015-10-02T11:54:46Z")

</div>

Tried to muddle through further troubleshooting by executing the restore from the CLI, but failed in two attempt:

First, I encountered `thor` as a missing dependency. After performing a `gem install thor` as root, I attempted the restore again, but then it failed with:

```
/var/www/discourse$ script/discourse restore discussion-forums-pilot-meta-2015-10-02-113808

Starting restore: discussion-forums-pilot-meta-2015-10-02-113808
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:665:in `rescue in connect': FATAL: database "discourse_development" does not exist (ActiveRecord::NoDatabaseError)
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:655:in `connect'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'

```

---

_[View the full topic](https://meta.discourse.org/t/exception-during-restore-exception-undefined-method-for-nil-nilclass/34019)._
