However, Discourse will not parse this in the Discourse plugin code; and so 8 hours later, I found that only one workaround was to "hack" the Gemfile during the container build process, as follows:
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_bundle_exec:
- exec:
cd: $home
cmd:
- echo "Hello Neo"
- echo "gem 'httparty'" >> Gemfile
- echo "gem 'ruby-openai'" >> Gemfile
- su discourse -c 'bundle config unset deployment'
- su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'
The above hack works. Nothing else worked. Believe me, I tried for 8 hours to accomplish this without hacking the Discourse Gemfile in this manner.
If anyone can get this to work without this messy hack, please post your solution.