This post originated from an RSS feed registered with Ruby Buzz
by Robby Russell.
Original Post: Master, console, and servant
Feed Title: Robby on Rails
Feed URL: http://www.contegix.com/rss/feed.xml
Feed Description: My reflections on programming with Ruby, Rails, PostgreSQL... and learning how to run a business...
I love console in Rails. It is absolutely one of my favorite tools in Rails. I probably spend more time testing stuff in console than I do in a browser, which is a good thing. Right?
Today, I was reading through a part of Programming Ruby (I like to open up to a random page and read something every once in a while) and came across a section on page 189. Subsessions and Bindings I was not aware that I could do this within irb and immediately thought to myself, “can I do that with console?” Console is afterall…just irb with all the Rails features pre-configured. So, I decided that I would try this out the next time I was in console.
That time came and passed… so, does it work?
The answer: YES!
I even have proof… :-)
This should eliminate a few tabs in iterm for me and works just like the Unix jobs and fg commands do.
Perhaps you enjoy the pain of constant browser reloads because you keep trying to figure out if that method works. Often times, you can copy and paste your code right into console. It’s beautiful and gives you a quicker response than your browser will ever.
But, you already knew that. Right?
Don’t get me wrong, I can totally understand your justifications for the extra pain. Who wants to work in their terminal more than they have to? (I do… but I do it because I am at home in my terminal.) There is nothing pretty about the terminal… but I feel in control. Are you a servant of your pretty GUI IDE and browser or are you the master of your terminal? ;-)
Okay, I will end this nonsense with my new console marketing campaign. I have employeed three pigeons to help me work on this one and the end result of our hard work?