LoginSignup
14
7

More than 5 years have passed since last update.

IntelliJで既存のRailsプロジェクトをRailsと認識させる方法

Last updated at Posted at 2019-04-20

え、Railsプロジェクト認識させるって、開くだけじゃないの??
私もそう思ってました。
しかし、IntelliJは既存のRailsプロジェクトを前にすると、全然インテリではない

「import project」や「open project」だと、かなりの確率でjRuby、jRailsのプロジェクトと認識します。
その他、Vue.jsやReactでフロントを作っているプロジェクトだと、なぜかstatic web siteと認識したりすることも。。

そんな愛すべきIntelliJですが、ほぼ100% Railsプロジェクトとして認識してくれる方法を見つけました。

1. create new projectを選ぶ

スクリーンショット 2019-04-20 12.18.35.png

2. Railsを指定

スクリーンショット 2019-04-20 12.19.38.png

3. Project name, locationに既存のRailsプロジェクトの名前、パスを設定しFinish

スクリーンショット 2019-04-20 12.21.14.png

4. Generate New Rails Applicationで「No」を選択

スクリーンショット 2019-04-20 12.26.50.png

5. 完了!!

無事Railsと認識され、Project SDKもRubyです

スクリーンショット 2019-04-20 12.30.53.png
スクリーンショット 2019-04-20 12.33.27.png

終わりに

以上、IntelliJで既存のRailsプロジェクトをRailsと認識させる方法でした。
この方法はRails以外の、他のフレームワークの既存プロジェクト設定でも概ね使えます。
快適なIntelliJライフを!!

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