Here's a challenge for your Rails development environment: Can your editor run a web server inside itself, capture runtime errors as they happen, and automatically jump to the exact line of code that caused the problem?
If you're using TextMate, Vim without extensive configuration, or a basic text editor, the answer is probably no. But if you're using Emacs with Rinari, this is exactly what you get.
The Traditional Rails Workflow Problem
The typical Rails development workflow looks like this:
- Write code in your editor
- Switch to terminal and start the Rails server
- Switch to browser and trigger the action
- See an error in the browser
- Switch back to your editor
- Find the file and line number mentioned in the error
- Fix the problem
- Switch back to terminal and restart server
- Switch to browser and test again
That's a lot of context switching. Every error means bouncing between at least three different applications. It breaks flow and slows you down.
What Rinari Does Differently
Rinari is an Emacs mode specifically designed for Ruby on Rails development. It brings the entire Rails development workflow into your editor, eliminating most of that context switching.
The killer feature is integrated server management with error capture. You can start WEBrick or Mongrel directly inside Emacs. The server runs in an Emacs buffer, which means Emacs can parse the output in real-time.
When your Rails application hits an error, Rinari captures it, parses the stack trace, and lets you jump directly to the offending line with a single keystroke. No manually finding the file. No scrolling to line 47. Just instant navigation from error to source.
How It Works in Practice
Say you're working on a controller action and make a typo in a variable name. You trigger the action in your browser, and Rails throws a NameError.
In the traditional workflow, you'd read the error in the browser, note the file and line number, switch to your editor, open the file (if it's not already open), and navigate to the line.
With Rinari, the error appears in your Emacs buffer. You hit a keybinding, and Emacs instantly opens the file and positions your cursor at the exact line. Fix the typo, save, refresh the browser, done. The entire process takes seconds instead of the mental overhead of manual navigation.
Beyond Error Navigation
Rinari offers much more than error capture:
- File navigation: Jump between models, views, controllers, and tests with dedicated commands
- Console integration: Run Rails console inside Emacs
- Test running: Execute tests without leaving your editor
- Log tailing: View development logs in real-time
- Rake integration: Run rake tasks from within Emacs
Combined with ruby-mode for syntax highlighting and indentation, Emacs becomes a complete Rails IDE without feeling heavy like Eclipse or NetBeans.
Why This Matters
Keeping everything in your editor isn't just about convenience—it's about maintaining flow. Every time you switch contexts, you lose a bit of focus. Every time you manually navigate to a file, you spend mental energy on navigation rather than problem-solving.
Rinari lets you stay focused on your code. The development server, error messages, logs, tests—everything is accessible without leaving Emacs. You think in code, not in application switching.
Getting Started
If you're interested in trying Rinari, check out the Emacs Wiki page for RubyOnRails for installation and configuration instructions.
Fair warning: if you're new to Emacs, there's a learning curve. But if you're already an Emacs user doing Rails development, Rinari is essential. It transforms Emacs from a text editor into a Rails development environment. Last modified: 2010-10-15 WordPress ID: 824