Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Comprehensive Ruby Programming

You're reading from   Comprehensive Ruby Programming From beginner to confident programmer

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787280649
Length 330 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jordan Hudgens Jordan Hudgens
Author Profile Icon Jordan Hudgens
Jordan Hudgens
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Introduction to the Ruby Programming Language FREE CHAPTER 2. Ruby Variables 3. Ruby Strings 4. Working with Numbers in Ruby 5. Ruby Methods 6. Ruby Iterators and Loops 7. Ruby Collections 8. Ruby Conditionals 9. Object-Oriented Programming in Ruby 10. Working with the Filesystem in Ruby 11. Error Handling in Ruby 12. Regular Expressions in Ruby 13. Searching with grep in Ruby 14. Ruby Gems 15. Ruby Metaprogramming 16. Ruby Web Frameworks 17. Working with APIs in Ruby 18. Ruby Algorithms 19. Machine Learning

Installing different Ruby versions with RVM

If you're interested in using RVM to manage multiple versions of Ruby on your system, I want to give some more detailed instructions on how you can accomplish this:

  1. Start out by going to your Terminal and typing the following command:
      rvm list

If you have RVM installed, this will bring up all of the versions of Ruby that you have access to on your computer.

  1. If there is a version of Ruby that you want and that you don't already have on your system, simply type this in to the Terminal:
      rvm install 2.3.0  

Running this command will install the 2.3.0 version of Ruby for you:

You can do this for any versions of Ruby that are available via RVM. This makes it easy to ensure you're always using the most up-to-date version of the language. Using RVM is also helpful if you have different projects that utilize various versions of the language. For example, I have some legacy Ruby projects that use Ruby version 1.9.3, while all of my new projects use Ruby 2.3.0 (at the time of writing this guide).

By leveraging RVM, I can quickly switch between different versions of Ruby with a simple Terminal command. Alternatively, if you're not a fan of RVM, you can also use rbenv, which is a similar service.

You have been reading a chapter from
Comprehensive Ruby Programming
Published in: Jun 2017
Publisher: Packt
ISBN-13: 9781787280649
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image