I\'ve seen very similar problems in other SO questions (e.g. No source for ruby-1.9.2-p321 provided with debugger-ruby_core_source gem) as well as through a Google search, but n
Debugger needs source of the Ruby to work.
So just reinstall the Ruby with source (not bin).
For example:
rvm reinstall 2.0.0 --disable-binary
Use byebug gem instead of fix my problem very well.
To solve this problem, you need reinstall rails' source code. This command will fix the problem:
$ rvm reinstall 2.0.0 --disable-binary
Then, the command $ bundle install
will work.
Reference: https://pfonseca.com/error-to-install-debugger-s-gem
Thanks all.
rvm list
rvm ruby-2.0.0-p451
Tried bundle install, got errors about not being able to install into non-bare repository, suggesting I remove cache directory; which I did:
rm -rf /usr/local/rvm/gems/ruby-2.0.0-p451/cache/
tried to
rvm gemsest use [my_gemset_name]
and got the same errors.
ended up using:
rvm gemset use default
and bundle install worked.
I am posting here because absolutely nothing worked. The only solution that fixed the problem for me:
Even though we are installing debugger, the error is in installing a requirement, debugger-ruby_core_source.
If you look at the error that is exactly where it raises the issue.
No source for ruby-2.0.0-p451 provided with debugger-ruby_core_source gem.
It is actually quite easy to fix this error. Just run the below command, installing the dependencies, and retry:
gem install debugger-ruby_core_source
Credit for this solution to: FIXED gem install debugger -v ’1.6.2′ No source for ruby
The problem is that your Gemfile.lock
lists an old debugger-ruby_core_source
gem. That gem needs to know about your specific ruby version, to get the header files correctly, and if the version your bundle install is too old, it won't work.
The correct solution is to update your Gemfile.lock
with a new version, by running
bundle update debugger-ruby_core_source
@delba's and @superuseroi's answers basically coming down to using gem
to install the debugger-ruby_core_source
gem directly from the source - which will pull the latest version, but fixing your bundle will be easier and will also persist in your source control (at least until you next upgrade your Ruby).
Also see this article about common Ruby gem issues