RubyMine Cannot Recognize Rails Application

I have a question regarding importing a rails application into RubyMine using the open from directory method. I have two different rails applications on my computer, but RubyMine only returns one of them as a Rails application, while the other recognizes it as a regular directory.

This is a problem since I want to get full functions from RubyMine for my current project. Can anyone come up with a RubyMine solution / method to determine if the application is rails or not? Thanks!

+6
source share
3 answers

The directory you open opens for the following files:

  • config/routes.rb - indicates the application for rails
  • config/application.rb - optional, indicates Rails 3+ application

If config/routes.rb present, the project is configured as Rails, otherwise you will get a simple Ruby project.

+1
source

For me, deleting and re- creating the project settings folder - .idea on linux - false recognition was resolved at the root of the project. After uninstalling, restart the IDE and open the project folder again . This solves minor other errors that may occur.

+9
source

For me, the problem was that RubyMine expected me to use ruby โ€‹โ€‹1.9.3 (which did not have rails gem installed) when I actually used 2.1.0. I installed it by opening the settings by clicking Languages & Frameworks > Ruby SDK and Gems , selecting RVM: ruby-1.9.3, and then clicking the minus button at the bottom of the window to remove it. I did this for the global ruby-1.9.3.

This forces RubyMine to use ruby-2.1.0 and its gemset, which solved all my problems :-)

0
source

Source: https://habr.com/ru/post/918851/


All Articles