DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Hiding Data in Cassandra
  • Extending Java APIs: Add Missing Features Without the Hassle
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]

Trending

  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Hiding Data in Cassandra
  • Extending Java APIs: Add Missing Features Without the Hassle
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Fixing debugger-linecache failure to install gem native extension with Ruby 1.9.3

Fixing debugger-linecache failure to install gem native extension with Ruby 1.9.3

Antonin Januska user avatar by
Antonin Januska
·
Dec. 03, 13 · Interview
Like (0)
Save
Tweet
Share
5.44K Views

Join the DZone community and get the full member experience.

Join For Free
If you’re still plagued by having to use Ruby 1.9.3 and you may be using, idk, Vagrant or any other type of testing environment, or just your own machine, you may have encountered the following error when installing either “debugger-ruby_core_source” or the “debugger-linecache” package.

This can particularly happen if you’re using RVM or other ruby version managers

Now, most stackoverflow answers and blogs will tell you to issue the following command:

     gem install debugger-ruby_core_source -v 1.2.3 --no-rdoc --no-ri -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p484
    gem install debugger-linecache -v 1.1.2 --no-rdoc --no-ri -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p484

Note that some sites may even say “install debugger-ruby_core_source first!” but that doesn’t work. And you still get this message:

    ERROR: Error installing debugger-linecache:
    ERROR: Failed to build gem native extension.
     
    /usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb --with-ruby-include=/usr/local/rvm/rubies/ruby-1.9.3-p484
    checking for vm_core.h... no
    checking for vm_core.h... no
    Makefile creation failed
    **************************************************************************
    No source for ruby-1.9.3-p484 provided with debugger-ruby_core_source gem.
    **************************************************************************
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.
     
    Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby
    --with-ruby-dir
    --without-ruby-dir
    --with-ruby-include=${ruby-dir}/include
    --with-ruby-lib
    --without-ruby-lib=${ruby-dir}/lib
     
    Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p484/gems/debugger-linecache-1.1.2 for inspection.
    Results logged to /usr/local/rvm/gems/ruby-1.9.3-p484/gems/debugger-linecache-1.1.2/ext/trace_nums/gem_make.out

So what’s going on? I’ll tell you.

Full-Proof Installation

First, let me tell you how you should be installing RVM and Ruby 1.9.3 in vagrant.

Step 1: Install RVM and Ruby

Here’s the command:

    # install RVM and Ruby
    curl -L https://get.rvm.io | bash -s stable
    source /usr/local/rvm/scripts/rvm
    rvm use --install 1.9.3

Got it? Awesome.

Step 2: Fetch Ruby Source Code

Here comes the important part. INSTALL THE RUBY SOURCE CODE! This is the part NO ONE tells you. Here’s what you add right below that installation:

    rvm fetch ruby-1.9.3-p484

Whoa, whoa, yep. That’s it. When your package tells you it can’t find vm_core, or that it can’t compile, this is probably the culprit. So make sure you fetch the source code.

Step 3: Install Debugger-Ruby-Core_Source first

If it wasn’t enough, we’ll install this nifty package first. This was the original fix on ruby’s github issue page. It works, some of the time, in some instances, sometimes. Let’s be sure we got it covered.

gem install debugger-ruby_core_source -v 1.2.3 --no-rdoc --no-ri -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p484

Ahh, what are all these damn options? More fallbacks:

  • “-v 1.2.3″ specify correct debugger-ruby_core_source version that works with your debugger-linecache.
  • “–no-rdoc –no-ri” don’t install documentation!
  • “– –with-ruby-include=$rvm_path/src/ruby-1.9.3-p484″ this makes sure that everything gets compiled correctly. Remember how we fetched the ruby source? Here’s where it gets used!

Step 4: Install Debugger-linecache

Ahh, finally here. This step is basically almost the same as the one above:

gem install debugger-linecache -v 1.1.2 --no-rdoc --no-ri -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p484

Yay! And watch the success roll out.

Step 5: THANK ME WITH YOUR LIFE

Jk. But yeah, make sure to reference this article if you use it.



GEM (desktop environment) Fetch (FTP client) Command (computing) Awesome (window manager) GitHub Documentation Blog Machine

Published at DZone with permission of Antonin Januska. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Implementing a Serverless DevOps Pipeline With AWS Lambda and CodePipeline
  • Hiding Data in Cassandra
  • Extending Java APIs: Add Missing Features Without the Hassle
  • Tactics and Strategies on Software Development: How To Reach Successful Software [Video]

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: