0
0

More than 1 year has passed since last update.

ローカルでRailsの環境構築

Posted at

Railsチュートリアルの通りにCloud9で環境構築をしていましたが、何度やり直しても正体不明のエラーが発生し初学者の自分では解決できそうになかったので、こちらのProgateの記事を見てMacのターミナルで環境構築し最初からローカルでやるようにしました。ところが、ここでもエラーが発生し、調べたところ下記の記事が検索結果のトップに出てきたのでこの通りにすると一応解決できました。

無限 Rails is not currently installed on this system. 問題の調査 - Qiita
https://qiita.com/amuyikam/items/313bc89c1de320a4257e

この記事の通りに
hash -r
を実行しました。

ys@mbp ~ % /usr/bin/rails --version
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.
ys@mbp ~ % hash -r
ys@mbp ~ % rails -v
Rails 7.0.3

きちんとRailsのバージョンが表示されました。
なぜこのコマンドでできたのかはちゃんとわかってませんが、ここで完璧に理解しようとしてもあまり意味がないと思うので先に進めます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0