How can I configure a gem so that it couldn't be installed on JRuby?
如何配置gem以使其无法安装在JRuby上?
1 个解决方案
#1
3
in *.gemspec:
s.platform = 'ruby'
possible platform values:
可能的平台值:
ruby
C Ruby (MRI) or Rubinius, but NOT Windows
ruby_18
ruby AND version 1.8
ruby_19
ruby AND version 1.9
mri
Same as ruby, but not Rubinius
mri_18
mri AND version 1.8
mri_19
mri AND version 1.9
rbx
Same as ruby, but only Rubinius (not MRI)
jruby
JRuby
mswin
Windows
mingw
Windows 'mingw32' platform (aka RubyInstaller)
mingw_18
mingw AND version 1.8
mingw_19
mingw AND version 1.9
#1
3
in *.gemspec:
s.platform = 'ruby'
possible platform values:
可能的平台值:
ruby
C Ruby (MRI) or Rubinius, but NOT Windows
ruby_18
ruby AND version 1.8
ruby_19
ruby AND version 1.9
mri
Same as ruby, but not Rubinius
mri_18
mri AND version 1.8
mri_19
mri AND version 1.9
rbx
Same as ruby, but only Rubinius (not MRI)
jruby
JRuby
mswin
Windows
mingw
Windows 'mingw32' platform (aka RubyInstaller)
mingw_18
mingw AND version 1.8
mingw_19
mingw AND version 1.9