How to install ruby-debug when needing necessary libraries and/or headers
The error is in the mkmf.log file. That file should be located at /home/hxh/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46/ext/linecache/mkmf.log
.
If not, you can use
sudo find / -name mkmf.log
to find it.
To troubleshoot further, see "How to install Nokogiri Ruby gem with mkmf.log saying libiconv not found?"
error in install ruby-debug-base on ruby 2.0.0p247
for ruby > 1.8.x you have to use another gem apparently (byebug), ref:
How to use the debugger with Ruby 2.0?
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
gem install ruby-debug19 - *** extconf.rb failed ***
ruby-debug19 only works on Ruby 1.9. For Ruby 2.0 and above use byebug.
gem install byebug
Could not create Makefile for some reason - Trying to install Ruby Gem
Reading the installation instructions of Rugged, you can see that both CMake and pkg-config
are required. Looking at your error message, it seems like CMake is not installed on your system.
If you are using Homebrew, you can install it by running
brew install cmake
Or you can install it from the source following these instructions.
Mac 10.8.4 failed to install any native ruby gem extension
Finally I've solved my problem, by reinstall xcode and command line tools, and then reinstall ruby with rvm
An error occurred while installing curb (0.8.5), and Bundler cannot continue
Try installing libcurl4-openssl-dev
and then installing again curb (give it a try with sudo
as well if that fails again)
Related Topics
Why Is Sum So Much Faster Than Inject(:+)
Rails Respond_To Format.Js API
How to Use Double Brackets in a Regular Expression
Looping in a Spiral Outside-In
How to Implement a Friendship Model in Rails 3 for a Social Networking Application
Converting an Array of Objects to Activerecord::Relation
Ruby - Share Logger Instance Among Module/Classes
Installing Vim with Ruby Support (+Ruby)
What Are the Benefits of the New Hash Syntax in Ruby 1.9
How to Dynamically Call a Math Operator in Ruby
Ruby Basic Data Type Conversion
Ruby - Access Multidimensional Hash and Avoid Access Nil Object
How to Set a File Upload Programmatically Using Paperclip
Ruby: How to Turn a Hash into Http Parameters
Converting an Integer to a Hexadecimal String in Ruby
How to Swap Keys and Values in a Hash