0
0

More than 1 year has passed since last update.

Railsでバージョン指定してのプロジェクト作成に失敗した時の対処法

Last updated at Posted at 2022-11-04

課題

Rails 6.1.4.4でプロジェクト作成しようと

rails _6.1.4.4_ new project_name

を走らせるが以下のようなエラーが出力される。

`find_spec_for_exe': can't find gem bundler (>= 6.1.4.4) with executable bundle (Gem::GemNotFoundException)

仮説

以前はこれでプロジェクトを作成できていたのですが、以前沼に嵌った時にRailsのバージョンを消去した記憶がうっすらあったのでその時に6.1.4.4を削除していたかもしれない。

解決方法

  • Rails 6.1.4.4を再度インストール
gem i -v 6.1.4.4 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