Server-side console.log() for your Rails application
Ruby
Latest commit d748eae Oct 24, 2009 @inem fixing readme
Permalink
Failed to load latest commit information.
lib init commit Aug 23, 2009
tasks init commit Aug 23, 2009
test init commit Aug 23, 2009
MIT-LICENSE init commit Aug 23, 2009
README.markdown fixing readme Oct 24, 2009
Rakefile init commit Aug 23, 2009
TODO added readme Oct 24, 2009
VERSION added VERSION Oct 24, 2009
init.rb init commit Aug 23, 2009
install.rb init commit Aug 23, 2009
uninstall.rb init commit Aug 23, 2009

README.markdown

Have you ever wanted to type console.log() in your rails app?

def index
  @people = People.all.age_less_than_20
  console.log(@people)
end

Handcar lets you to push data from your rails application to firebug console.

In Action

  • Here is your action:

    def index
        honk('Handcar is ruby on rails console for your firebug')
        honk(['this is string',2,{:hash_in => 'Array'},5,6])
        honk(nil)
        honk(2)
        honk({:simple_hash => {:hash_in => 'Hash'}, :in => ''})
    end
    
  • And here is you firebug console:
    handcar output in firebug console

  • And moreover, when you get an error, it will display all your honks before that error:
    handcar output in firebug console
    I think you have got the idea

Installation

Handcar has two parts: rails plugin & firefox plugin.
Both had to be installed:

  • Firefox extention
  • Rails plugin:
    ./script/plugin install git://github.com/inem/handcar.git

Possible issues

  • Handcar aims only local development process. It will not communicate with non-localhost machine.
  • You will not see actual ruby objects in firebug. Of course it is your objects' representations in JSON format

Source code