Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
The Ruby Programming Language2:46 with Jason Seifer
Welcome to Ruby Basics! In this course, we’re going to learn about the Ruby programming language. We’ll learn the rules for creating ruby programs and then practice those rules and run our programs.
Ruby is a programming language which can be used to write programs.
irb stands for "interactive Ruby" and can be used to try out ruby code by typing it in.
More General Information about Ruby
[The Ruby Language on Wikipedia](https://en.wikipedia.org/wiki/Ruby_(programming_language)
To check if Ruby is installed and see the version number, type the following in the "Console" area of the workspaces prompt:
You should see something like the following:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Launch an interactive ruby console by typing the following in to the "Console" portion of workspaces:
Type the following to display a message on your screen:
puts "Hello world!"
Hi everybody, and welcome to the Ruby basics course.
In this course,
we're going to be learning the very basics of the Ruby programming language.
When we're programming in Ruby, we have to follow certain rules.
The rules that we have to follow are called syntax, and
we have to be very explicit when talking to Ruby.
We're going to be following along in a tool called Workspaces, and
we can code Ruby right in the browser, so you don't need to have it installed.
Let's go ahead and get started right now, with a very simple application.
If you're on teamtreehouse.com, click on Workspaces, and
then click on New Workspace.
Down here, where it says Any environment, click on Ruby, and
make sure Ruby Workspace is selected.
I'm going to name my workspace Ruby Basics.
And then click on Create Workspace.
It will take just a moment for the workspace to load.
Here we have an empty Ruby workspace.
We have the welcome document that says what workspaces was designed to do.
We don't need to worry about this for right now.
Down here we have the console.
This is primarily where we'll be invoking what's called the Ruby Interpreter,
which runs our Ruby programs.
On the left side, we have the file and directory list.
We're not going to use it right now, but this is where we can create Ruby files.
Let's go ahead and make sure that Ruby is working.
For right now we can type in ruby, a dash, and the letter v.
This will make sure that Ruby is installed and tell us what version it is.
Great, we see that Ruby is installed, and we have some numbers here.
That is the current version of Ruby that's installed.
We don't really need to worry about everything else after that for right now.
Now let's start writing some Ruby code.
We can do this in something called Interactive Ruby.
We can get there by typing in the letters i, r, and b for Interactive Ruby.
This gives us a Ruby prompt.
Now let's do something very basic and print something to the screen.
We can do that by typing puts, which stands for put string,
then a quote, and we can type Hello world.
Close the quotes and press enter, and
if we look right here, Ruby has printed out, Hello world, for us.
Now, go ahead and try that yourself.
You need to sign up for Treehouse in order to download course files.Sign up