Error installing debugger-linecache: ERROR: Failed to build gem native extension
I had a very similar error, but on ruby 1.9.3. Running:
gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286/
Got it working for me. Credit to this answer.
An error occurred while installing debugger-linecache (1.1.1), and Bundler cannot continue
I had this issue after updating to a newer patch version of ruby. Unfortunately the header files gem "debugger-ruby_core_source" was locked in to an earlier version in the Gemfile.lock so it didn't have the required header files.
All you need to do is update that gem by doing:
bundle update debugger-ruby_core_source
You should be able to bundle install afterwards.
If you aren't using bundler then just install the latest version before trying to install debugger:
gem install debugger-ruby_core_source
How to get rid of this error when trying to run ruby-debug on a ruby script
Ended up solving my problem by installing the gem debugger
instead: http://rubygems.org/gems/debugger
- Add the gem to your Gemfile:
gem 'debugger', group: [:development, :test]
- Run bundler:
bundle install
If you need some guidance on how use the gem follow the video tutorial Creating a blog in 15 minutes with Rails - Part 2. Basically, you need to do two things to interrupt the server rendering a page.
- Add the command
debugger
somewhere in your ruby code. If its a view use<% debugger %>
instead. - Start the server with a parameter:
rails server --debugger
Can't install ruby-debug, error: rb_method_entry_t.called_id
ruby-debug is broken for ruby 1.9, give "pry" a try, instead. Maybe it is possible to get ruby-debug working but I wouldn't count on it.
Debugging in ruby 1.9
failer on bundle with rubber about debugger-linecache
ok after long period of search found that u need install ruby-debug-base19 gem for some respons that what i missed now all work
Error installing debugger: Failed to build gem native extension with ruby-1.9.3-p362
I ran into same issue. I tried:
bundle update debugger
My Gemfile had this:
gem 'debugger'
And it worked, I did not have to change Gemfile. Output of bundle shows something like this
...
Installing debugger-ruby_core_source (1.1.6)
Installing debugger-linecache (1.1.2) with native extensions
Installing debugger (1.1.4) with native extensions
...
Related Topics
How to Use Same Terminal Window After Using "Rails Server" Command
Manually Retry Job in Delayed_Job
Ruby Working on Array Elements in Groups of Four
Active Admin: Customize Only New Form
Ruby 1.9, Force_Encoding, But Check
How to Install Ruby on Rails 3 on Osx
Ruby Koans: Explicit Scoping on a Class Definition Part 2
What Is Catch and Throw Used for in Ruby
How to Ruby on Rails Authentication with Ldap
Capistrano Asks for Password When Deploying, Despite Ssh Keys
When to Use Struct Instead of Hash in Ruby
How to Call Expire_Fragment from Rails Observer/Model
Rails: Hasmanythroughassociationnotfounderror
Monkey-Patching VS. S.O.L.I.D. Principles