You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
this works fine. My problem is that for example nokogiri doesn't have a binary version for Ruby 2.5 yet, but it can be compiled for it.
Fetching nokogiri 1.8.1 (x64-mingw32)
Installing nokogiri 1.8.1 (x64-mingw32)
Gem::RuntimeRequirementNotMetError: nokogiri requires Ruby version < 2.5, >=
2.2. The current ruby version is 2.5.0.
An error occurred while installing nokogiri (1.8.1), and Bundler cannot
continue.
so I did it
gem install nokogiri --platform=ruby
however bundle update still wants x64-mingw32 platform
Resolving dependencies...
Using bundler 1.16.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.1
Bundle updated!
but if I specify the ruby platform in my Gemfile
gem "nokogiri", platforms: [:ruby]
Resolving dependencies...
Using bundler 1.16.1
Bundle updated!
nokogiri is gone.
desired behaviour
In my opinion the best way would be to use a compiled version automatically if a binary version isn't available, but it was rejected.
according to #5337 the platform can be forced only for a whole Gemfile, but there's a problem
bundle lock --add-platform ruby
bundle config force_ruby_platform true
Gemfile
gem 'nokogiri'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby, :ruby]
=> both gems should be installed
actual behaviour
'tzinfo-data' is ignored unless I remove all platforms specifications.
I want to have a single platform independent Gemfile that works for all 3 cases:
Linux
Windows with binary gems
Windows with force_ruby_platform
Am I missing something? Any suggestions?
Environment
Bundler 1.16.1
Platforms ruby, x64-mingw32
Ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
Full Path C:/Ruby25-x64/bin/ruby.exe
Config Dir C:/ProgramData
RubyGems 2.7.3
Gem Home C:/Ruby25-x64/lib/ruby/gems/2.5.0
Gem Path C:/Users/pdaho/.gem/ruby/2.5.0;C:/Ruby25-x64/lib/ruby/gems/2.5.0
User Path C:/Users/pdaho/.gem/ruby/2.5.0
Bin Dir C:/Ruby25-x64/bin
Tools
Git 2.15.1.windows.2
RVM not installed
rbenv not installed
chruby not installed
Bundler Build Metadata
Built At 2017-12-21
Git SHA 0034ef341
Released Version true
Bundler settings
build.nokogiri
Set for the current user (C:/Users/pdaho/.bundle/config): "--use-system-libraries"
force_ruby_platform
Set for the current user (C:/Users/pdaho/.bundle/config): true
When you set force_ruby_platform, you're telling bundler to treat your machine entirely as if it is 'just ruby', and ignore whether it is actually jruby, on windows, etc
is there a way to define it in platforms for this case? because this doesn't work (force ruby platform is true)
gem "nokogiri", platforms: [:ruby]
if I remove platforms entirely, the gem is installed, but I always have to modify the Gemfile
gem "nokogiri"
I want to have a general Gemfile, that will allow me to use native extensions or even better choose automaticaly the best gem available (prebuild or compiled)
There probably aren't many users on Windows or other platforms that could benefit from such feature. It's just an idea, so feel free to close the ticket.
The same problem with Ruby 2.6.5. I want to know is there a way to force bundle install with platform Ruby in command line? like bundle install --force-platform ruby.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to specify a gem only for specific platforms.
this works fine. My problem is that for example nokogiri doesn't have a binary version for Ruby 2.5 yet, but it can be compiled for it.
so I did it
however bundle update still wants x64-mingw32 platform
I tried
now bundler recognises ruby platform.
but if I specify the ruby platform in my Gemfile
nokogiri is gone.
desired behaviour
In my opinion the best way would be to use a compiled version automatically if a binary version isn't available, but it was rejected.
according to #5337 the platform can be forced only for a whole Gemfile, but there's a problem
actual behaviour
I want to have a single platform independent Gemfile that works for all 3 cases:
Linux
Windows with binary gems
Windows with force_ruby_platform
Am I missing something? Any suggestions?
Environment
Bundler Build Metadata
Bundler settings
Gemfile
Gemfile
Gemfile.lock
The text was updated successfully, but these errors were encountered: