Rails 4 (beta1) depends on Rdoc ~>3.4 but Ruby 2 on Rdoc 4

Gemfile.lock

...
railties (4.0.0.beta1)
  actionpack (= 4.0.0.beta1)
  activesupport (= 4.0.0.beta1)
  rake (>= 0.8.7)
  rdoc (~> 3.4)
  thor (>= 0.17.0, < 2.0)
...

So this fact makes ri not work in a Ruby 2 + Rails 4 project at the moment… I suspect this could be the reason why docs were not included by default by RVM. Or possibly the other way around, due to the fact that docs are never included by default (so seldom used), Rails developers didn’t see there was a problem.

The easiest temporary fix is to use the full path to (the good) ri:

$ /Users/.../.rvm/rubies/ruby-2.0.0-p0/bin/ri String

Another temporary fix (I’m currently using this one) is to

  1. manually edit the Gemfile.lock such that above line reads instead
    rdoc (>= 3.4)
  2. execute
    $ bundle update rdoc

After that, you can again execute ri without specifying its path.

$ ri String

The need for an IDE in Ruby + Rails

Reading the 4th edition of the Agile Web Development with Rails book by Sam Ruby.

With Ruby, however, much of this support just isn’t necessary. Editors such as TextMate and BBEdit give you 90 percent of what you’d get from an IDE but are far lighter weight. Just about the only useful IDE facility that’s missing is refactoring support.

Hm, that’s unfortunate. One of the most useful IDE facility that’s missing is debugging support !! When you have a debugger integrated into the editor, you are not anymore thinking about debugging because it’s just another editing task.

You look at a piece of code, put a breakpoint, hit debug, and review the application state at that point in time, step by step.

RubyMine Issues

RubyMine is my preferred IDE for Ruby development. I chose it for local and remote debugging from the browser. It has some space for improvement but it’s also pretty good. And support is excellent.

These are the issues that I’ve reported. This list is mostly for my own use.

  1. Replace in Path should be integrated into Find in Path
  2. The ‘Replace in Path’ functionality is completely broken
  3. Number of ‘Found usages’ depends on wether the button ‘Merge usages from the same line’ is pressed or not
  4. Exclude external libraries from a custom scope of ‘Find in Path’
  5. In a big text file, it takes up to 2 seconds to move the caret only 1 char
  6. Depending on path tooltip position, displayed document is garbled
  7. Depending on caret position, displayed document is garbled
  8. Replace in Path (with a grouping RegEx) makes a mess (depending on input)
  9. File comparison should behave differently for ending lines
  10. Breakpoints dialog floats on top even if the parent project is closed (it has no closing button either)
  11. Extract CSS is broken
  12. Dream remote debugging with the PassengerDebugger option
  13. How to remotely debug Rails in Apache + Passenger + RubyMine