A user attempted to restore a backup using the command line but encountered an error due to the missing Thor gem. tgxworld suggested installing the Thor gem manually using gem install thor. However, users Chopper and eviltrout questioned why the Thor gem is not installed by default, as it is required for CLI backups. Mittineague pointed out that the Thor gem is listed in the Gemfile.lock, but Chopper reported that the gem is not installed on a fresh install. sam agreed that expecting users to install gems manually is unreasonable. A potential fix was proposed by eviltrout, but michaeld warned that Thor versions beyond 0.19.1 can cause issues. A possible solution is to install the Thor gem when the backup button is clicked and remove it afterwards to avoid version conflicts.
I tried to restore a backup with command line (GUI is not an option) but I get this error :
root@forum:/var/discourse# ./launcher enter app
root@forum-app:/var/www/discourse# discourse restore
You must provide a filename to restore. Did you mean one of the following?
script/discourse restore tact-forum-2017-02-01-075306-v20161216101352.tar.gz
root@forum-app:/var/www/discourse# script/discourse restore tact-forum-2017-02-01-075306-v20161216101352.tar.gz
/usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- thor (LoadError)
from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from script/discourse:3:in `<main>'
Really? Whenever I encountered the error I’d type gem install thor on the command line to get the latest version and it’s always worked. Do you have steps to reproduce it?