nixpkgs/pkgs/servers/web-apps/discourse/plugin_gem_api_version.patch
talyz 71474d1e41 discourse: Add a proper plugin builder + a few initial packages
Some discourse plugins have Ruby dependencies and require a
specialized builder. This introduces a generic builder that can be
used whether the plugin has Ruby dependencies or not. It also adds a
set of pre-packaged plugins available through `discourse.plugins` and
provides an easy way to add more.

(cherry picked from commit 7671b90919af8271bdf7e07bb86d63216a2145d6)
2021-06-30 22:07:26 +00:00

14 lines
420 B
Diff

diff --git a/lib/plugin_gem.rb b/lib/plugin_gem.rb
index 855d1aca2c..8115623547 100644
--- a/lib/plugin_gem.rb
+++ b/lib/plugin_gem.rb
@@ -4,7 +4,7 @@ module PluginGem
def self.load(path, name, version, opts = nil)
opts ||= {}
- gems_path = File.dirname(path) + "/gems/#{RUBY_VERSION}"
+ gems_path = File.dirname(path) + "/gems/#{Gem.ruby_api_version}"
spec_path = gems_path + "/specifications"