2

I've created a new Rails application, then I ran bundle, and the bundle completed successfully. Then I modified the byebug entry from

gem 'byebug', platform: :mri

to

gem 'byebug', platform: [:mri, :mingw, :x64_mingw]

so that it works with Windows.

Then, I ran bundle again and I'm getting RuntimeError: Unable to find a spec satisfying byebug (>= 0) in the set. Perhaps the lockfile is corrupted?

Why does this happen and how can I solve it (not undoing the Gemfile modification)?

garci560
  • 2,993
  • 4
  • 25
  • 34

2 Answers2

1

Not entirely sure if this is any help to you, but the issue I had is that one of my gem's .gemspec had a duplicate dependency in it, like so:

spec.add_dependency 'rails', '~> 4.1'
spec.add_dependency 'rails'

Removing the duplicate fixed my issue.

Thource
  • 78
  • 5
0

I was stuck on this issue too. In the end I figured the issue was the difference of platform being used on development and staging/production.

To fix this issue try:

bundle lock --add-platform ruby x86-mingw32 x64-mingw32

Toucouleur
  • 1,194
  • 1
  • 10
  • 30