Rails console
No commentsI 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.
In this post I talked about...
Qui
Comments