[DRE-maint] Bug#783972: rubygems-integration: Incompatibility with ruby >= 2.1
Gustavo Machado Campagnani Gama
nsn.igenesis at gmail.com
Fri May 1 18:55:22 UTC 2015
Package: rubygems-integration
Version: 1.8
Severity: minor
Dear Maintainer,
Starting with ruby 2.1, the rubygems package has split the Gem::Specification
class into three:
Gem::BasicSpecification
Gem::StubSpecification < Gem::BasicSpecification
Gem::Specification < Gem::BasicSpecification
This is problematic when using rubygems-integration and ruby >= 2.1,
because the patch applied to the Gem::Specification class (in the file
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_systems.rb) no
longer works on instances of the Gem::StubSpecification class. For me,
this issue manifests as the following warning that is printed by the
"spring" gem:
Warning: Running `gem pristine --all` to regenerate your installed
gemspecs (and deleting then reinstalling your bundle if you use bundle
--path) will improve the startup performance of Spring.
And, naturally, running 'gem pristine --all' or reinstalling the bundle
doesn't really fix anything.
Below is a suggested patch to the "operating_systems.rb" file:
------------------------ CUT HERE ---------------------
end
-if RUBY_VERSION >= '2.0' then
- class << Gem::Specification
+spec_class = if RUBY_VERSION >= '2.1'
+ Gem::BasicSpecification
+ elsif RUBY_VERSION >= '2.0'
+ Gem::Specification
+ else
+ nil
+ end
+if spec_class
+ class << spec_class
alias :upstream_default_specifications_dir :default_specifications_dir
def default_specifications_dir
------------------------ CUT HERE ---------------------
Thanks for your time and consideration.
--
Gustavo
-- System Information:
Debian Release: jessie/sid
APT prefers trusty-security
APT policy: (505, 'trusty-security'), (501, 'trusty-updates'), (500, 'trusty'), (400, 'trusty-proposed'), (400, 'trusty-backports')
Architecture: i386 (i686)
Kernel: Linux 3.16.0-31-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
rubygems-integration depends on no packages.
rubygems-integration recommends no packages.
Versions of packages rubygems-integration suggests:
pn bundler <none>
-- no debconf information
More information about the Pkg-ruby-extras-maintainers
mailing list