-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bundler doesn't respect other than the native platform while resolving the gems to install #5337
Comments
You might want to look at the |
Bundler v 1.14 tried to load native gems on jruby rubygems/bundler#5337
If I use the setting |
Using |
rake-compiler-1.0.3+ adds ruby version constraints to all generated native gems. This issue will therefore probably affect many future gems that are built via rake-compiler (or rake-compiler-dock). |
@segiddins if we were able to set |
I dont think that is likely to happen any time soon, sorry |
Having looked into the bundler code (especially #4836 ) I realized, that
the ruby version constraints of gems aren't currently considered as a best
match criteria for the gem resolution process. So I think the above
expectation is more a feature request than a bug report. Maybe the title
should be changed accordingly?
|
This is a viable solution tzinfo/tzinfo-data#12 (comment) |
Closing, I don't think there's anything actionable for us here, given |
Original issue is oneclick/rubyinstaller2#7 : Nokogiri installs successfully on RubyInstaller2 when
--platform=ruby
is used. There is also a fat binary gem for x86-mingw32, but it is limited to Ruby versions 2.0 to 2.3. It can not be installed on Ruby-2.4.0 due to this ruby version constraint, which is expected behavior. However bundler doesn't use theplatform=ruby
gem version as an alternative, regardless whether it is already installed or not.Installed versions (with nokogiri installed as platform=ruby):
Using a fresh Rails-5.0.1 project (generated per
rails new railstest
) with this Gemfile .When platform
ruby
is added perbundle lock
, I would expect, that the installed version will be used. But instead an older nokogiri version (1.6.6.4) forx86-mingw32
is installed. This version doesn't work on Ruby-2.4, since it doesn't contain the Ruby-2.4 binary extension, but it wasn't labeled with proper ruby version constraints to that point in time:When the platform
x86-mingw32
is explicit removed, thebundle install
fails with a dependency issue - although the nokogiri gem is already locally installed in the latest version 1.7.0.1 :Is there a way to let bundler choose the platform=ruby version of the gem? Why is the
bundle lock
platform setting not respected?The text was updated successfully, but these errors were encountered: