Set Up Ruby Debugging environment

Source: Internet
Author: User

Today I finally got Ruby debugging working in Eclipse. Below is the major setup steps involved, as well as some problems one might encounter along the.

1. Install DLTK Plugin

To make Eclipse a Ruby IDE, one popular plugin to be installed is, "Dynamic Languages Toolkit-ruby Development Tools", As shown below:

2. Install Ruby and Development Kit

Eclipse uses a "debugger" Gem as debugging engine, which empowers eclipse to debug Ruby. Unfortunately this ' debugger ' gem has some limitations; It works under some particular versions of Ruby out of the boxes, as indicated in below link:

Https://github.com/cldwalker/debugger#known-issues

The Rubyinstaller Development Kit (DevKit) is a MSYS/MINGW based toolkit than enables your to build many of the native c/c+ + Extensions available for rubythe Rubyinstaller. One of the challenges many Ruby on Windows users has is what to easily use native RubyGems from the community such as the Rdiscount or curb gems. In many cases this isn ' t a problem because the extension author have provided a binary gem compatible with the users Ruby E Nvironment. In other cases, only the extension source code was available in the Gem and the user was expected to has a "sane" environme NT installed and configured in order to build and use the native gem. A "sane" environment typically means a system with make, GCC, SH and similar *nix build tools installed.

This expectation of a "sane" build environment are not always true for Windows users and are the primary reason why the DEVK It was created. The DevKit, based upon MSYS and MinGW components, are an easy-to-install and easy-to-use solution for quickly setting up a "Sane" build environment, enabling the use of most native RubyGems developed by the Ruby community.

For me, I used below versions of Ruby and its development kit.

L Ruby 1.9.3-p550ruby 1.9.3-p550

L Devkit-tdm-32-4.5.2-20111229-1559-sfx.exe

3. Install Debugger Gem

Install The gem quite easy,

Just Type:

Gem Install debugger

In some areas/countries, the default gem of source is blocked. As a result, below error would occur

Unable to download data from https://rubygems.org/-errno::econnrefused:connection refused-connect (2)

You can use the other sources like the from Taobao.

Gem Sources-a http://ruby.taobao.org/

Gem Sources-r https://rubygems.org/
4. Configure Ruby interpreter in eclipse

Set up appropriate version of Ruby want Eclipse to run/debug your ruby Scritps.

5. Done

6. Reverences and Links

1) Ruby Download link

Http://rubyinstaller.org/downloads/archives

2) Ruby Development link Download

http://rubyinstaller.org/downloads/

Set up Ruby debugging environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.