Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle lock --add-platform ruby fails #5230

Closed
agross opened this issue Dec 5, 2016 · 1 comment
Closed

bundle lock --add-platform ruby fails #5230

agross opened this issue Dec 5, 2016 · 1 comment
Assignees

Comments

@agross
Copy link

agross commented Dec 5, 2016

As per #4620 (comment) I wanted to test bundle lock --add-platform ruby on Windows.

  • What did you do?

    I ran the command C:/Ruby/bin/bundle lock --add-platform ruby

  • What did you expect to happen?

    Add the ruby platform to the lockfile

  • What happened instead?

    I got this error:

Error details

    NoMethodError: undefined method `to_a' for "ruby":String
Did you mean?  to_r
       to_f
       to_i
       to_s
       to_c
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/lock.rb:35:in `block in run'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/lock.rb:33:in `each'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/lock.rb:33:in `run'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:462:in `lock'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:34:in `block in <top (required)>'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
      C:/Ruby/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:26:in `<top (required)>'
      C:/Ruby/bin/bundle:22:in `load'
      C:/Ruby/bin/bundle:22:in `<main>'

Environment

  Bundler   1.13.6
  Rubygems  2.6.7
  Ruby      2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
  GEM_HOME  C:/Ruby/lib/ruby/gems/2.3.0
  GEM_PATH  C:/Ruby/lib/ruby/gems/2.3.0;C:/Users/agross/.gem/ruby/2.3.0
  Git       2.11.0

      Bundler settings

  gem.test
    Set for the current user (C:/Users/agross/.bundle/config): "rspec"
  gem.mit
    Set for the current user (C:/Users/agross/.bundle/config): "false"
  gem.coc
    Set for the current user (C:/Users/agross/.bundle/config): "false"
@segiddins segiddins self-assigned this Dec 5, 2016
@segiddins
Copy link
Member

Thanks, have a quick fix for this, just need to write tests

bundlerbot added a commit that referenced this issue Dec 17, 2016
[Lock] Fix --add-platform ruby

Necessary since the ruby platform is a string instead of a platform object

Closes #5230
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants