Welcome to the Treehouse Community
Looking to learn something new?
kabir kCourses Plus Student 18,036 Points
When to use the console and/or irb for Ruby
I want to be clear as to when to use the console and/or irb for working with the Ruby programming language.
Also, is the console the same as the terminal?
David Becerra6,077 Points
You'll want to use the console or irb mostly when you're experimenting (at least in my case). Whenever you want to run some ruby either in a rails environment, a gem, or even a single ruby file.
I use it a lot to try out queries or when I'm brainstorming the interface of a feature i'm building. Usually a quick and dirty way that helps me explore.
The console is something you run in the terminal.
rowend rowend2,926 Points
I recommend you use irb when you want to test a few lines of code. I recommend you use console (ruby ruby_file_name.rb) when you want to make a bigger program.