- Comprehensive Ruby Programming
- Jordan Hudgens
- 438字
- 2021-07-02 21:13:20
Ruby language dashboard
Let's start by going to http://ruby-lang.org:

When you click on the Download Ruby button, it will take you to the following page:

This page gives you information on how to install Ruby on your system.
If you are using the Windows operating system, follow these steps:
- Go to rubyinstaller.org:

- From this list, you can pick the stable version you want, I recommend that you go with the latest stable version. When you click on any of these links, the installer will run and you will be ready to go.
If you're using macOS, Ruby is already installed on your system. To check this follow these steps:
- I created a file called do_I_have_ruby.rb, which has only one line of code in it:
puts "Yes, you have Ruby!"
- Next, go to your Terminal (make sure that you're in the same directory as your Ruby file) and run the file with the following command:
ruby do_I_have_ruby.rb
This should display your string, if Ruby is properly installed:

One thing that you can do if you are using the Mac or Linux operating systems is to use the Ruby Version Manager (RVM). This gives you the flexibility to use different Ruby versions for different projects.
To install RVM, go to http://rvm.io, and here you will find the Terminal commands that you can simply copy and paste in your Terminal:

Once you've installed RVM, type rvm list and this should list out all the Ruby versions on your system. If you want to change versions you can call the use command. For example, type in your Terminal to switch to Ruby version 2.4.0:
rvm 2.4.0
If you don't want to install Ruby on your local system, but still want to learn how to build Ruby programs, you can go to http://repl.it/languages. This should give you the list of languages available in the repl.it dashboard. When you click on Ruby, it will take you to a Terminal that will render all your Ruby code.
I tend to use this site if I have to quickly debug an algorithm or a confusing script. It's a great tool because you're able to get a side-by-side perspective on your code with its output:
So that's how you install Ruby! Now with that installed, you're ready to start learning how to build Ruby programs!
- C及C++程序設(shè)計(第4版)
- 程序設(shè)計與實踐(VB.NET)
- 深入實踐Spring Boot
- NLTK基礎(chǔ)教程:用NLTK和Python庫構(gòu)建機器學(xué)習(xí)應(yīng)用
- 微服務(wù)設(shè)計原理與架構(gòu)
- 面向STEM的Scratch創(chuàng)新課程
- Linux環(huán)境編程:從應(yīng)用到內(nèi)核
- ADI DSP應(yīng)用技術(shù)集錦
- 運用后端技術(shù)處理業(yè)務(wù)邏輯(藍橋杯軟件大賽培訓(xùn)教材-Java方向)
- Visual Basic程序設(shè)計教程
- 基于ARM Cortex-M4F內(nèi)核的MSP432 MCU開發(fā)實踐
- Scratch趣味編程:陪孩子像搭積木一樣學(xué)編程
- 移動增值應(yīng)用開發(fā)技術(shù)導(dǎo)論
- 新印象:解構(gòu)UI界面設(shè)計
- Java程序設(shè)計教程