Rubymine - Rails gem not found

吃可爱长大的小学妹 提交于 2019-11-28 23:50:22

This may help for rubymine.

You need to add ruby sdks

In RubyMine from file -> settings -> ruby Sdk and Gems -> add sdk

You can add multiple ruby version sdks and its gems

You can edit project specific ruby setup after starting project from menu

run -> edit configuration -> ruby sdk (select specific rails environment)

$ which ruby  #to get current ruby path

For posterity: don't select a Ruby version from the wrappers folders that are generated by rvm. Ruby thinks it's OK, but you get the Rails error.

When gem installed locally, just add the path to the SDK:

for example: ~/.gem/ruby/2.2.0/gems on File > Project Settings > Platform Settings > SDKs > Classpath (press + button)

When you close and open again you will get a notification saying:

RubyMine Gem Manager: RubyMine has detected that some of the gems required for 'projectName' are not installed. Install

Click Install and it will run the bundle install for the project, all got solved after that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!