I'm a beginner.This is a poor question, but could you please advise me?
Attempt to install rails ver6.0.3 in VSCode, but
Successfully installed rails-6.0.4 but
rails-v
is not included
Ruby 2.7.6
M1 chip
Big Server 11.2.3
I want to install Rails to create a portfolio
Error:
cannot load Such file --etc(LoadError)
In the past, Ruby version was set to 3.0.1, but from the point of view of portfolio creation, we have returned to 2.7.6.I might have done something strange at that time.
First, railsgem is installed, and the ability to execute the rails
command means something is installed.If it is not installed, the PATH will fail to find the executable file rails
.This symptom is that the railsgem is installed, but the cannot load Such file --etc(LoadError)
error appears.
For ruby 2.7 and ruby 3.0, etcgem is the default gem (standard installed gem).If you can't find it, there's something wrong with ruby's environment.
You changed the ruby version, but if you did something by yourself without using version control tools such as rbenv or homebrew, you might have broken something at that time.
We can investigate the cause and fix it, but in this case, it seems that it is the fastest way to uninstall everything and build the environment from the beginning.
Ruby 2.7 is scheduled to end of life in March 2023.As long as there are no restrictions on which library you want to use, I recommend that you use a newer version of ruby if you are going to make a new one now.
© 2024 OneMinuteCode. All rights reserved.