Set up ruby debugging environment

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/

时间: 2024-08-08 06:32:30

Set up ruby debugging environment的相关文章

Command Line Android Application Debugging

http://codeseekah.com/2012/02/16/command-line-android-development-debugging/ I personally have a distaste towards IDEs, preferring lightweight solutions, with maybe less convenience. I addition to saving resources and having direct control over what

Docker on YARN在Hulu的实现

这篇文章是我来Hulu这一年做的主要工作,结合当下流行的两个开源方案Docker和YARN,提供了一套灵活的编程模型,目前支持DAG编程模型,将会支持长服务编程模型. 基于Voidbox,开发者可以很容易的写出一个分布式的框架,Docker作为运行的执行引擎,YARN作为集群资源的管理系统. 同时这篇文章也发表在Hulu官方的技术博客上:http://tech.hulu.com/blog/2015/08/06/voidbox-docker-on-yarn/ 1. Voidbox Motivati

集成开发环境(IDE)

集成开发环境(Integrated Development Environment,简称IDE,也称为Integration Design Environment.Integration Debugging Environment)是一种辅助程序开发人员开发软件的应用软件. IDE通常包括编程语言编辑器.自动构建工具.通常还包括调试器.有些IDE包含编译器/解释器,如微软的Microsoft Visual Studio,有些则不包含,如Eclipse.SharpDevelop等,这些IDE是通过

Eclipse在Tomcat环境下运行项目出现NoClassDefFoundError/ClassNotFoundException解决办法

For this error, there can be different solutions. I have noted down the ones that had worked for me. Solution 1. This is always happened in deployment and debugging environment. In deployment environment, just make sure your server classpath has incl

WatiN自动化测试

简介 WatiN - Watir的.NET版: http://watin.sourceforge.net/ Welcome at the WatiN (pronounced as What-in) website. Inspired  by Watir development of WatiN started in December 2005 to make a similar kind of Web Application Testing possible for the .Net langu

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

VS有个比较迷惑人的一个选项就是在工程>>属性中有个Executable Directories设置项, 几乎所有地球人都认为这个选项是设置DLL目录用的,这无疑会方便用户调式,不用来回拷贝一堆DLL文件到工程目录运行,但是所有人都他喵的失败了. google了一下,正确的做法是设置Debugging >> Environment目录,语法是PATH=目录,就像cmd下设置环境变量那样.

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

目前的项目依赖于很多第三方库,每次要再一个新的环境编译/运行,都要花很长时间先编译/安装各种第三方库,而且会出现各种问题,因此决定将所有第三方库编译好之后,放入工程的子目录中,以后就不用重复编译了. 目录结构 整理后的目录结构如下: 一些设置 如此修改目录结构之后,VS工程的一些设置需要进行修改,分别说明一下: 输出文件的路径 在工程属性中 Configuration Properties > General > Output Directory 指定的是编译出来的lib/dll/exe存放的

C语言cgi(1)

1Columbia Universitycs3157 – Advanced ProgrammingSummer 2014, Lab #2, 60ish pointsJune 9, 2014Follow these step-by-step instructions. This lab must be submitted electronically by Monday June16th, 11:55 pm.The point of the labs is to teach and reinfor

centos 清理内存缓存

读写文件时,Linux内核为了提高读写效率与速度,会将文件在内存中进行缓存,这就是Cache Memory(缓存内存).即使程序运行结束后,Cache Memory也不会自动释放.这就会导致程序频繁读写文件后,可用物理内存会很少.其实这缓存内存(Cache Memory)在你需要使用内存的时候会自动释放,所以不必担心没有内存可用.如果你希望手动去释放Cache Memory(缓存内存)的话也是有办法的. 清理缓存(drop_caches)的官方文档:http://www.kernel.org/d