[Ruby] How to use rbenv (version `x.x.x'is not installed)

ruby version error

When I tried to pull out a Rails product that I used to put on Github and run it,

version `x.x.x' is not installed

It seems that the version of ruby is different. ..

rbenv command

#Check the list
rbenv install --list

#install
rbenv install x.x.x

#Set the version to use by default
rbenv global x.x.x

##Installed Rubyx.x.Make x available
rbenv rehash

Now you can develop with your favorite version of ruby!

If you also need Rails, add this as well

sudo gem install rails

bonus

I omitted it because it seems to be long, but I got an error like this. No matter how much you install (sudo gem install rails), it will come out infinitely, It seems to be a famous error. Since it interferes with ruby which is included in Mac by default,


Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

After installing rbenv and ruby-build with the following command It can be solved by setting this article.


brew install rbenv ruby-build

I'm glad if you can use it as a reference.

Recommended Posts

[Ruby] How to use rbenv (version `x.x.x'is not installed)
How to use rbenv
How to use Ruby return
Rbenv command to use Ruby
Ruby: How to use cookies
How to install ruby through rbenv
How to use Ruby on Rails
[Ruby] How to use any? Method
How to use Ruby inject method
[Ruby on Rails] How to use CarrierWave
What to do if you installed Ruby with rbenv but the version does not change
Ruby length, size, count How to use
[Ruby] How to use slice for beginners
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
Ruby: CSV :: How to use Table Note
How to build an environment for any version of Ruby using rbenv
[Ruby] How to use gsub method and sub method
How to use nfs protocol version 2 with ubuntu 18.04
[Ruby on Rails] How to use session method
[Ruby basics] How to use the slice method
How to use Map
How to use letter_opener_web
How to use with_option
How to use fields_for
How to use java.util.logging
How to use collection_select
How to use Twitter4J
How to use active_hash! !!
How to use MapStruct
How to use hidden_field_tag
How to use TreeSet
[How to use label]
How to use identity
How to use hashes
How to use JUnit 5
How to use Dozer.mapper
How to use Gradle
How to use org.immutables
How to use java.util.stream.Collector
How to use VisualVM
How to use Map
[Ruby] How to use standard output in conditional branching
How to use Struts2 * Spring Framework (Spring plugin) June 2017 Version
Correspondence when Ruby version does not switch in rbenv
[Java] How to use Map
How to lower java version
[Java] How to use Map
How to use Priority Queuing
Ruby version switching with rbenv
[Rails] How to use enum
How to use java Optional
How to use JUnit (beginner)
Ruby version does not switch
[Rails] How to use enum
How to use @Builder (Lombok)
[Swift] How to use UserDefaults
How to use java class
How to use Swift UIScrollView
[Ruby] How to comment out
How to use Big Decimal