Successfully installed rails -6.0.4 but cannot load Such file --etc(LoadError) when executed

Asked 1 years ago, Updated 1 years ago, 87 views

I'm a beginner.This is a poor question, but could you please advise me?

Current State/Environment

Attempt to install rails ver6.0.3 in VSCode, but
Successfully installed rails-6.0.4 but
rails-v is not included

as far as you can see.

Ruby 2.7.6
M1 chip Big Server 11.2.3

What do you want to do

I want to install Rails to create a portfolio

Actual Error Message

Google < p > < code > to Install a generic name of - as an active component 6. 0 4 < / code > can be fed into < / > " Success been installed successfully wirelessly combining diaeresis " Spanning on rails - (6). 4 " < / >, but is displayed as < code > on rails - v < / code > and the following error is displayed. for inputting < / >

Error:

cannot load Such file --etc(LoadError)

Remember

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.

Reference image

Enter a description of the image here

ruby-on-rails ruby rubygems

2022-09-30 16:15

1 Answers

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.


2022-09-30 16:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.