ruby-debug with Ruby 1.9.3?

前端 未结 9 1292
甜味超标
甜味超标 2020-11-28 04:41

I just updated to Ruby 1.9.3p0 and Rails 3.1.1. Now when I try to launch the server, it complains that I should install ruby-debug, even though it\'s already in

相关标签:
9条回答
  • 2020-11-28 05:15

    Maybe not the definitive answer to this question, but I was lead here by a chain of closed duplicates.

    For me the problem was that I run a project in both ruby 1.8 and ruby 1.9, and my Gemfile needed this change:

    gem 'debugger', :require => 'ruby-debug', :platforms => :mri_19
    gem 'ruby-debug', :platforms => :mri_18
    

    Now it works for both rubies.

    For more info see here: http://gembundler.com/man/gemfile.5.html#PLATFORMS-platforms-

    0 讨论(0)
  • 2020-11-28 05:16

    For Windows Users:

    First Download :linecache19-0.5.13.gem and ruby-debug-base19-0.11.26.gem From : http://rubyforge.org/frs/?group_id=8883&release_id=46303

    Assumption: Ruby is in c:\Ruby1.93

    put the gem files downloaded to c:\temp (linecache19-0.5.13.gem and ruby-debug-base19-0.11.26.gem)

    then execute from command line:

    gem install c:\temp\linecache19-0.5.13.gem

    gem install c:\temp\ruby-debug-base19-0.11.26.gem -- --with-ruby-include=C:\Ruby1.93\include\ruby-1.9.1\ruby-1.9.3-p0

    0 讨论(0)
  • 2020-11-28 05:20

    Installation of linecache19 and ruby-debug-base19 can be easily done with:

    bash < <(curl -L https://raw.github.com/gist/1333785)
    
    0 讨论(0)
  • 2020-11-28 05:27

    See my answer here : Ruby-debug not working - Stack Overflow

    It's about getting Ruby debugging to work with the following setup

    • Mac OS X Lion 10.7.2
    • Aptana Studio 3 (Build 3.0.8.201201201658)
    • Using rvm, in my project working directory I have a .rvmrc stating:

      rvm use ruby-1.9.3-p0@mygemset
      

    Basically, I had to use :

    linecache19 (0.5.13)
    ruby-debug-base19x (0.11.30.pre10)
    ruby-debug-ide (0.4.16)
    

    Note that I'm not using ruby-debug-base19 but ruby-debug-base19x

    I hope this helps!

    -- Freddy

    0 讨论(0)
  • 2020-11-28 05:31

    Also you need to check if the gem 'ruby_source_code' is already installed.

    Check: http://bugs.ruby-lang.org/issues/1857#note-8

    0 讨论(0)
  • 2020-11-28 05:35

    If you don't have rvm and assuming you ruby installation is in /usr/local/ruby-1.9.3-po your can use this command:

    curl -L https://raw.github.com/gist/1533750 | sudo /bin/bash

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