1
1

More than 3 years have passed since last update.

シェルをzshに変えたらrailsコマンドが使えなくなった件

Posted at

まずはじめに、、、

  • 自分のメモ用に書き残しておきたく投稿しているので読みづらかったり間違えている箇所があるかもしれないのでその点につきましてはお許しください
  • 間違えている箇所につきましてはコメントでご指摘していただけたら幸いです

さて本題の問題について

macOSをcatalinaにしてからシェルをzshにせずにbashのままでいたらターミナルを開くたびに見慣れない英語がずらりと書かれていたのでその通りにシェルをzshに変更した後にrailsコマンドを使おうとしたら、、、

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.

この通りに実行しrailsコマンドをすると、、、

You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)

今度はこんなエラーに:frowning2:


解決できた方法

シェルを変更したことによってrbenvのパスを通し直すことをすっかり忘れていたのが原因でした

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

これでしっかりパスを通し直して一件落着でした!!!

1
1
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
1
1