# Command line restore for web only container can't load thor

**URL:** https://meta.discourse.org/t/command-line-restore-for-web-only-container-cant-load-thor/68570
**Category:** Development
**Tags:** two-container
**Created:** [2017 年8 月 22 日 22:36 UTC](https://meta.discourse.org/t/command-line-restore-for-web-only-container-cant-load-thor/68570 "2017-08-22T22:36:58Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### 作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### 发布日期： [2017 年8 月 25 日 03:25 UTC](https://meta.discourse.org/t/command-line-restore-for-web-only-container-cant-load-thor/68570/8 "2017-08-25T03:25:05Z")

</div>

> [@tgxworld](#):
>
> I think it would be better if we figure out what the current path is and suggest the appropriate command.

Sounds right.

> [@tgxworld](#):
>
> Running script/discourse is right if I’m in the /var/www/discourse directory.

Have you done that recently? That’s where I discovered this problem, and why I started the thread. This is for enable\_restore, but it’s the same can’t-load-rails problem.

```plaintext
root@discourse:~# cd /var/discourse/
root@discourse:/var/discourse# ./launcher enter app
root@discourse:/var/www/discourse# discourse enable_restore
Expected string default value for '--verbose'; got false (boolean)
Restore are now permitted. Disable them with `disable_restore`
root@discourse:/var/www/discourse# script/discourse enable_restore
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:317:in `check_for_activated_spec!': You have already activated thor 0.20.0, but your Gemfile requires thor 0.19.4. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:32:in `block in setup'
        from /usr/local/lib/ruby/2.3.0/forwardable.rb:204:in `each'
        from /usr/local/lib/ruby/2.3.0/forwardable.rb:204:in `each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:27:in `map'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:27:in `setup'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:9:in `<top (required)>'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /var/www/discourse/config/boot.rb:11:in `<top (required)>'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /var/www/discourse/config/application.rb:1:in `<top (required)>'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /var/www/discourse/config/environment.rb:2:in `<top (required)>'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from script/discourse:221:in `load_rails'
        from script/discourse:137:in `enable_restore'
        from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from /usr/local/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from script/discourse:262:in `<main>'
root@discourse:/var/www/discourse# 

```

---

_[View the full topic](https://meta.discourse.org/t/command-line-restore-for-web-only-container-cant-load-thor/68570)._
