When I was in China, I wanted to change the gem mirror source. At discourse-ai of fork, I modified the gem mirror source information in Gemfile and gemfile. lock, but the log display was still downloaded from https://rubygems.org/. How to make the gem installation in discourse-ai use the gem image source modified in web.china.template.yml
I, [2023-11-10T04:40:17.388494 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
IOError: HTTP session not yet started (Gem::RemoteFetcher::FetchError)
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/remote_fetcher.rb:266:in `rescue in fetch_path'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/remote_fetcher.rb:246:in `fetch_path'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/remote_fetcher.rb:294:in `cache_update_path'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/remote_fetcher.rb:161:in `rescue in download'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/remote_fetcher.rb:146:in `download'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/source.rb:212:in `download'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/resolver/specification.rb:113:in `download'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/resolver/specification.rb:99:in `install'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/request_set.rb:281:in `block in install_into'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/request_set.rb:273:in `each'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/request_set.rb:273:in `install_into'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/request_set.rb:148:in `install'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/commands/install_command.rb:215:in `install_gem'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/commands/install_command.rb:231:in `block in install_gems'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/commands/install_command.rb:224:in `each'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/commands/install_command.rb:224:in `install_gems'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/commands/install_command.rb:170:in `execute'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/command.rb:328:in `invoke_with_build_args'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/command_manager.rb:253:in `invoke_command'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/command_manager.rb:193:in `process_args'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/command_manager.rb:151:in `run'
/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:56:in `run'
/usr/local/bin/gem:12:in `<main>'
I, [2023-11-10T04:49:21.015453 #1] INFO -- : gem install tokenizers -v 0.3.3 -i /var/www/discourse/plugins/discourse-ai/gems/3.2.2 --no-document --ignore-dependencies --no-user-install
You are specifying the gem tokenizers in /var/www/discourse/plugins/discourse-ai/plugin.rb, however it does not exist!
Looked for:
- /var/www/discourse/plugins/discourse-ai/gems/3.2.2/specifications/tokenizers-0.3.3.gemspec
- /var/www/discourse/plugins/discourse-ai/gems/3.2.2/specifications/tokenizers-0.3.3-x86_64-linux.gemspec
- /var/www/discourse/plugins/discourse-ai/gems/3.2.2/specifications/tokenizers-0.3.3-x86_64-linux.gemspec
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 885 exit 255>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 255
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
7d6d7efb62fe5cd8f1d85af89fb43a28089d4d91449fec274758f1c5ba2a589d
sudo ./launcher bootstrap web_only,This error is often encountered