Beginner Series: Ruby Tutorial
There are several online portals that allow you to work with Ruby and Ruby on Rails without ever installing anything. This is great if you just want to do some quick tutorials, or play around with the language.
But it’s best if you actually setup your own development environment so you can work with the language locally.
If you want to work in an Integrated Development Environment (IDE) some good options for Windows users are RubyWin, and Ruby Development Environment or RDE.
Keep in mind, there’s nothing wrong with writing code in a plain text editor, either. Notepad works great (Notepad++ even better) but you won’t be able to run your code after without installing the local Ruby environment too.
Recommended Training – Treehouse
Although this site recommends various training services, our top recommendation is Treehouse.
Treehouse is an online training service that teaches web design, web development and app development with videos, quizzes and interactive coding exercises.
Treehouse's mission is to bring technology education to those who can't get it, and is committed to helping its students find jobs. If you're looking to turn coding into your career, you should consider Treehouse.
What Do You Need for Ruby?
One of the really neat aspects of Ruby is that it comes with the IRb (Interactive Ruby) shell in the official package. This is an experimentation shell for playing around with Ruby code because it allows you to see expression results immediately.
Once you install Ruby on your machine, the shell is ready to go. You can run the shell by opening a command prompt, typing “irb” and then pressing enter. This will allow you to input Ruby code and see the result instantly.
So, when it comes to actually coding programs you can use a text editor like we mentioned above. However, for tutorials, you can simply rely on the IRb shell.
Installing Ruby on Windows
For Windows users, there is a project called RubyInstaller that makes adding Ruby to your machine simple. Download and install to get up and running.
Installing Ruby on OSX
Fortunately, Ruby comes installed on Yosemite and Mavericks out of the box, but you can easily add it on other versions by using HomeBrew.
$ brew install ruby
Installing Ruby on *nix
Install from source
Make sure you get the latest version, 2.3.0 is current as of today, but may not be when you are ready to install.
$ wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz
Unpackage the components
$ tar -xvzf ruby-2.3.0.tgz
Change to the newly created ruby directory
$ cd ruby-2.3.0
Configure and Make
$ ./configure $ make
Install the interpreter
$ sudo make install
Test the install
$ ruby -v
Use a Package Management System
You can use Yum on CentOS, Fedora, or RHEL
$ sudo yum intall ruby
Use apt on Debian and Ubuntu
$ sudo apt-get install ruby-full
For a complete list of install instructions, see the Ruby install page.
Next, you’ll learn How to Code with Ruby as a Beginner!
Disclosure of Material Connection: Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.