Installing a git-based gem from a discourse plugin

Using this in the plugin.rb file will always try to fetch the gem from Rubygems - it won’t use the locally installed version. I think your options are:

  1. Push your customized version of the gem to rubygems, remove the >> Gemfile hack, and use the plugin.rb gem API to install it.

  2. Remove the >> Gemfile hack, set up a private rubygems server and install like:

    gem 'omniauth-ldap-i18n', '1.0.0', source: "https://mygemserver.example.com"
    
  3. Add Git support to our plugin gem loader. If you can do it without affecting existing functionality, this would be pr-welcome

  4. Remove the gem method call from plugin.rb. Since you have the >> Gemfile hack, the gem should be automatically available within Discourse. But I would stress that this is a hack - we can’t guarantee overriding core files like this will work perfectly forever.