Answers for "ruby version"

4

rvm install new ruby version

$ ruby -v 						# Check ruby version 
$ rvm install ruby-X.X.X        # Install specific ruby version
$ rvm list						# List ruby versions
$ rvm use ruby-X.X.X			# Choose a version to use
$ rvm use ruby-X.X.X --default  # Set a version as default
Posted by: Guest on October-12-2020
3

how to check ruby version

// Command line:
$ ruby -v

// Within irb type "RUBY_VERSION"
# => "2.4.1"

// If using RVM:
$ rvm current
# => ruby-2.4.1
Posted by: Guest on February-04-2020
3

install ruby

$ sudo apt-get install ruby-full
Posted by: Guest on December-22-2020
1

ruby version from script

There is a RUBY_PATCHLEVEL constant as well. So you can get your version string as

p "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"

--iltempo
Posted by: Guest on January-29-2021

Browse Popular Code Answers by Language