[Easy] How to upgrade Ruby and bundler

background

The versions of ruby and bundler are old, and I had a lot of trouble with errors when deploying, so I will write it down as a memorandum. ..

Ruby version upgrade

  1. This time, it is assumed that there is no Ruby 2.6.3.

  2. Install the latest version.

$ brew upgrade ruby-build
  1. Display and confirm the installable version list.
Available versions:
  1.8.5-p52
  1.8.5-p113
  1.8.5-p114
  1.8.5-p115
  1.8.5-p231
  ---Omission---
  2.5.4
  2.5.5
  2.6.0-dev
  2.6.0-preview1
  2.6.0-preview2
  2.6.0-preview3
  2.6.0-rc1
  2.6.0-rc2
  2.6.0
  2.6.1
  2.6.3
  1. Install rbenv.
$ rbenv install 2.6.3
  1. Set to use the installed version. Execute the following command, and if it is set to 2.6.3., You do not need to do anything.
$ rbenv versions
  system
  2.4.1
  2.5.1
  2.5.3
* 2.6.3 (set by /Users/user_name/hoge/.ruby-version)
 $ rbenv global 2.6.3
$ rbenv local 2.6.3
  1. Install bundler.
$ gem install bundler
  1. Update the Ruby version to the latest stable version 2.6.3.
$ bundle install --path=vendor/bundle

Recommended Posts

[Easy] How to upgrade Ruby and bundler
[Ruby] How to convert from lowercase to uppercase and from uppercase to lowercase
[Ruby] How to use gsub method and sub method
Ruby How to convert between uppercase and lowercase
How to use Ruby return
[Ruby] How to comment out
How to handle TSV files and CSV files in Ruby
[Ruby] How to get the tens place and the ones place
(Ruby on Rails6) How to create models and tables
[Linux] Easy commentary! How to check and change permissions
[Easy] How to automatically format Ruby erb file with vsCode
How to deal with different versions of rbenv and Ruby
How to use StringBurrer and Arrays.toString.
How to use EventBus3 and ThreadMode
How to iterate infinitely in Ruby
How to install ruby through rbenv
How to use Ruby on Rails
How to call classes and methods
How to use equality and equality (how to use equals)
How to install Bootstrap in Ruby
[Ruby] How to use any? Method
How to connect Heroku and Sequel
Project ruby and rails version upgrade
How to use Ruby inject method
How to execute Ruby irb (interactive ruby)
Offline real-time how to write F03 ruby and C implementation example
How to get and add data from Firebase Firestore in Ruby
Easy to understand the difference between Ruby instance method and class method.
Upgrade and switch Ruby versions on Windows 10
[Ruby on Rails] How to use CarrierWave
How to blur an image (super easy)
Ruby length, size, count How to use
[Java] How to output and write files!
How to set up and use kapt
How to build SquashTM and how to support Japanese
[Ruby] How to use slice for beginners
How to find the tens and ones
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
How to use substring and substr methods
Ruby: CSV :: How to use Table Note
Note: [Docker] How to start and stop
How to write and explain Dockerfile, docker-compose
How to use @Builder and @NoArgsConstructor together
Convert JSON to TSV and TSV to JSON with Ruby
JDBC promises and examples of how to write
How to find the cause of the Ruby error
Introduction to Ruby 2
[Ruby] How to convert CSV file to Yaml (Yml)
[Java] How to use FileReader class and BufferedReader class
[Ruby on Rails] How to display error messages
How to execute and mock methods using JUnit
How to add / remove Ruby on Rails columns
[Java] How to get and output standard input
How to play audio and music using javascript
How to deploy
[Ruby] "Reference to object" and "Contents of variable"
How to use Segmented Control and points to note
Git and GitHub ~ How to fix common errors ~
[Ruby] How to calculate the total amount using the initialize method and class variables
How to set up and operate jEnv (Mac)