Tuesday, January 18, 2011

Netbeans Won't Debug Rails Project

If the Netbeans says it "can't contact the web server" when running "Debug Project" there is likely an issue with the debug gems that the IDE installs itself. To correct this problem:
  1. Exit Netbeans
  2. $ gem uninstall linecache
  3. $ gem uninstall ruby-debug-base
  4. $ gem uninstall ruby-debug-ide
  5. $ gem install ruby-debug-ide
  6. Start Netbeans, and "Debug Project"

Please note that I am using MRI (native Ruby), not JRuby.
  • Netbeans 6.9.1 (Linux)
  • ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux]
  • RubyGems 1.4.1
  • linecache (0.43)
  • ruby-debug-base (0.10.4)
  • ruby-debug-ide (0.4.16)