No source for ruby-2.0.0-p451 provided with debugger-ruby_core_source gem

后端 未结 9 637
孤街浪徒
孤街浪徒 2021-02-05 07:47

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

相关标签:
9条回答
  • 2021-02-05 08:21

    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
    
    0 讨论(0)
  • 2021-02-05 08:23

    Use byebug gem instead of fix my problem very well.

    0 讨论(0)
  • 2021-02-05 08:24

    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

    0 讨论(0)
  • 2021-02-05 08:27

    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.

    0 讨论(0)
  • 2021-02-05 08:30

    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

    0 讨论(0)
  • 2021-02-05 08:32

    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

    0 讨论(0)
提交回复
热议问题