如何在Win7上調試Ruby程序

先安裝rubyinstaller,下載並解壓DevKit,注意,這兩個版本要對應,網頁上有說明(http://rubyinstaller.org/downloads/),解壓DevKit後,打開目錄,運行devkitvars.bat(是不是必須的不確定)。

打開cmd,進入DevKit的解壓目錄

ruby dk.rb

---

Configures an MSYS/MinGW based Development Kit (DevKit) for
each of the Ruby installations on your Windows system. The
DevKit enables you to build many of the available native
RubyGems that don't yet have a binary gem.

Usage: ruby dk.rb COMMAND [options]

where COMMAND is one of:

  init     prepare DevKit for installation
  review   review DevKit install plan
  install  install required DevKit executables

and 'install' [options] are:

  -f, --force  overwrite existing helper scripts


-------------

ruby dk.rb init

---

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

--------------------------------

ruby dk.rb install

---

Invalid configuration or no Rubies listed. Please fix 'config.yml'
and rerun 'ruby dk.rb install'
如果出現的是這個,則需要修改config.yml

加入

- C:\Ruby200-x64

---
[INFO] Updating convenience notice gem override for 'C:/Ruby200-x64'
[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'

這是對的

---------------------

gem install ruby-debug-ide

---

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed ruby-debug-ide-0.4.17
Parsing documentation for ruby-debug-ide-0.4.17
Installing ri documentation for ruby-debug-ide-0.4.17
1 gem installed

-------------------------

安裝aptana 的eclipse plugin ,url http://download.aptana.com/studio3/plugin/install


這樣就能調試ruby程序了


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章