Home>

I installed Ruby on Rails, but I got the following error.

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.

As I checked variously, it seemed that the pass did not pass, so

export PATH="$HOME/.rbenv/shims:$PATH"

When I check the version,

Rails 6.0.3.2


Since it was displayed, I thought that I was able to install it safely with this, but when I disconnect the terminal,
Also, the above error message is displayed each time I start up, and I have to pass the path every time.
If i understand, please give me an answer.

  • Answer # 1

    Whenever I disconnect the terminal, the above error message is displayed each time I start the terminal, and I have to pass the path every time.

    Yes, what is an environment variable originallyThat kind of thingis. You need to set it every time you start the shell.

    However, it is difficult to use, so the script file (~/.bash_profileOr~/.bashrcIt is possible to set each time automatically by writing the environment variable setting command in (etc.).