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

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 only 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 you to build many of the native C/C++ extensions available for RubyThe RubyInstaller. One of the challenges many Ruby on Windows users have is how 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 has provided a binary gem compatible with the users Ruby environment. In other cases, only the extension source code is available in the gem and the user is expected to have a “sane” environment 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 is not always true for Windows users and is the primary reason why the DevKit was created. The DevKit, based upon MSYS and MinGW components, is an easy-to-install and easy-to-use solution for quickly setting up a “sane” build environment, enabling you to use 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 source is blocked. As a result, below error will occur

Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2)

you can use other sources like that 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 you 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的更多相关文章

  1. SOS.dll (SOS Debugging Extension)

    SOS.dll (SOS Debugging Extension) lays threads associated with a live thread. The -special option di ...

  2. Ruby 环境

    Ruby 环境 本地环境设置 如果您想要设置 Ruby 编程语言的环境,请阅读本章节的内容.本章将向您讲解与环境设置有关的所有重要的主题.建议先学习下面几个主题,然后再进一步深入学习其他主题: Lin ...

  3. Docker on YARN在Hulu的实现

    这篇文章是我来Hulu这一年做的主要工作,结合当下流行的两个开源方案Docker和YARN,提供了一套灵活的编程模型,目前支持DAG编程模型,将会支持长服务编程模型. 基于Voidbox,开发者可以很 ...

  4. VS2013正确设置DLL环境变量目录的方法

    VS有个比较迷惑人的选项,就是在工程>>属性中有个Executable Directories设置项, 几乎所有地球人都认为这个选项是设置exe可执行文件依赖的DLL目录用的,这无疑会方便 ...

  5. centos 清理内存缓存

    读写文件时,Linux内核为了提高读写效率与速度,会将文件在内存中进行缓存,这就是Cache Memory(缓存内存).即使程序运行结束后,Cache Memory也不会自动释放.这就会导致程序频繁读 ...

  6. [C++] 在Visual Studio工程中管理C++第三方库

    目前的项目依赖于很多第三方库,每次要再一个新的环境编译/运行,都要花很长时间先编译/安装各种第三方库,而且会出现各种问题,因此决定将所有第三方库编译好之后,放入工程的子目录中,以后就不用重复编译了. ...

  7. C语言cgi(1)

    1Columbia Universitycs3157 – Advanced ProgrammingSummer 2014, Lab #2, 60ish pointsJune 9, 2014Follow ...

  8. WinDbg 之 SOS扩展命令

    SOS.dll (SOS debugging extension) The SOS Debugging Extension (SOS.dll) helps you debug managed prog ...

  9. 华为Eudemon 100E的密码恢复

    华为Eudemon 100E的密码恢复 转自http://blog.sina.com.cn/s/blog_53835f380100hdc3.html  为了让自己下次能记住 Eudemon 100E系 ...

随机推荐

  1. maven No compiler is provided environment

    eclipse maven操作正常出现的No compiler is provided in this environment. Perhaps you are running on a JRE ra ...

  2. Qt 学习之路 2(43):QStringListModel

    Qt 学习之路 2(43):QStringListModel 豆子 2013年2月13日 Qt 学习之路 2 38条评论 上一章我们已经了解到有关 list.table 和 tree 三个最常用的视图 ...

  3. Qt 学习之路 2(42):QListWidget、QTreeWidget 和 QTableWidget

    Qt 学习之路 2(42):QListWidget.QTreeWidget 和 QTableWidget 豆子 2013年2月5日 Qt 学习之路 2 38条评论 上一章我们了解了 model/vie ...

  4. Android 开源项目使用指南

    1.日历项目 https://blog.csdn.net/iamchan/article/details/81214498

  5. 011 Android TabLayout+ViewPager实现顶部滑动效果(多个页面)

    1.TabLayout介绍 TabLayout提供了一个水平的布局用来展示Tabs,很多应用都有这样的设计,典型的有网易新闻,简书,知乎等.TabLayout就可以很好的完成这一职责,首先TabLay ...

  6. P4592 [TJOI2018]异或 (可持久化Trie)

    [题目链接] https://www.luogu.org/problemnew/show/P4592 题目描述 现在有一颗以\(1\)为根节点的由\(n\)个节点组成的树,树上每个节点上都有一个权值\ ...

  7. Angular 2: 404 error occur when I refresh through the browser [duplicate]

    https://stackoverflow.com/questions/35284988/angular-2-404-error-occur-when-i-refresh-through-the-br ...

  8. 2016 ccpc 杭州 D.Difference hdu5936(折半枚举)

    有坑!!!当x==0时,因为y>0,a,b不能同时为0,所以答案要-1 #include<iostream> #include<cstdlib> #include< ...

  9. POJ - 3764 01字典树+前缀异或和

    异或关于前缀的特性:[u,v]=[1,u]^[1,v] 注意是路径,假设1为根,prexor[1]不保留数值 /*H E A D*/ int to[maxn<<1],nxt[maxn< ...

  10. WSH的SpecialFolders对像

    前面我做过一个VBS,来实现添加网站快捷方式到开始菜单,当然你也可以添加到别的地方,这就是那个对像的一些用法返回 SpecialFolders 对象(特殊文件夹集). object.SpecialFo ...