Rails console

No comments

I just found that in Ruby on Rails there is a “./script/console” script which lets you access all the application from a consol prompt, in this way you can manipulate all of your objects and do all sort of things and i find it really useful specially when you need to debug some nasty bugs in your model.

I had known this before I would have not spent most of the afternoon going after a bug in the Rails application I’m developing. After a long quest around my code, I extracted what seemed the offending piece of program from the model, built a test case and run it in the irb, and there it was a stupid initialization error.

Using console I would have just skipped all the plumbing and beoing able to interact with the single parts of the application I would have concentrated the attention on the model.

Posted on Aug 26, 2005 · Filed under General, RubyOnRails, Technology

Comments

No comments so far.

Add your comment

Discussion is closed for this post.

Trackback

You can trackback this post from your own site using this trackback link:
http://www.spazidigitali.com/2005/08/26/rails-console/trackback/