Cov txheej txheem:

Kuv yuav nruab qhov tseeb version ntawm Ruby li cas?
Kuv yuav nruab qhov tseeb version ntawm Ruby li cas?

Video: Kuv yuav nruab qhov tseeb version ntawm Ruby li cas?

Video: Kuv yuav nruab qhov tseeb version ntawm Ruby li cas?
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Tej zaum
Anonim

Ua raws li cov kauj ruam no los ua:

  1. Kauj ruam 1: Teeb tsa RVM tseeb ruaj khov version . Ua ntej, peb yuav tsum hloov kho RVM ntawm peb lub kaw lus nrog lub tseeb ruaj khov version muaj nyob ntawm
  2. Kauj ruam 2: Tau txais cov npe ntawm txhua yam muaj Ruby versions .
  3. Kauj ruam 3: Nruab qhov tseeb Ruby version .
  4. Kauj ruam 4: Teem lub Qhov tseeb version ntawm Ruby raws li default.

Raws li, kuv yuav ua li cas rau nruab ib lub tshiab version ntawm Ruby?

Yuav ua li cas rau nruab Ruby ntawm Linux

  1. Qhib lub qhov rais davhlau ya nyob twg.
  2. Khiav cov lus txib uas ruby.
  3. Txhawm rau txheeb xyuas tias koj muaj Ruby version tam sim no, khiav cov lus txib ruby -v.
  4. Sib piv tus lej version rov qab nrog tus lej version ntawm nplooj ntawv ruby ruby.
  5. Nruab cov pob Ruby tsim nyog.

Tsis tas li ntawd, kuv yuav ua li cas thiaj paub tias Ruby version twg raug teeb tsa? Kauj ruam 1: Saib Ruby Version Qhib cov lus hais kom ua thiab ntaus ruby -v. Yog Ruby teb, thiab yog tias nws qhia a version tus lej ntawm lossis siab dua 2.2. 2, ces ntaus lub pov haum -- version . Yog tias koj tsis tau txais qhov yuam kev, hla mus Nruab Ruby kauj ruam.

Tsis tas li ntawd, dab tsi yog qhov tseeb version ntawm Ruby?

Cov tam sim no ruaj khov version yog 2.7.

Download Ruby

  • Ntawm Linux / UNIX, koj tuaj yeem siv cov kev tswj hwm pob ntawm koj qhov kev faib tawm lossis cov cuab yeej thib peb (rbenv thiab RVM).
  • Ntawm macOS tshuab, koj tuaj yeem siv cov cuab yeej thib peb (rbenv thiab RVM).
  • Ntawm Windows tshuab, koj tuaj yeem siv RubyInstaller.

Kuv yuav ua li cas rau nruab qhov tseeb version ntawm Ruby ntawm Ubuntu?

Txhawm rau nruab Ruby los ntawm lub neej ntawd Ubuntu repositories, ua raws cov kauj ruam no:

  1. Ua ntej, hloov kho cov pob khoom ntsuas: sudo apt hloov tshiab.
  2. Nruab Ruby los ntawm ntaus ntawv: sudo apt nruab ruby-tag nrho.
  3. Txhawm rau txheeb xyuas qhov kev teeb tsa nws tau ua tiav khiav cov lus txib hauv qab no uas yuav luam tawm Ruby version: ruby --version.

Pom zoo: