25

I updated to Ruby 2.0 and Rails 4.0 and RubyMine stopped working.

If I do my Rails commands through command line tool, they work just fine but if I want to run my project through RubyMine (the latest version) I get error 134 and No Rails Founds in the SDK error.

So I am sure it is not a big deal and it is just some minor setting that needs to be updated in the IDE but can't figure it out yet. And not sure what kind of details do I need to provide so here is Tools -> Show Gem Environment info from the IDE:

RUBYGEMS VERSION: 2.0.3
RUBY VERSION: 2.0.0 (2013-07-05 patchlevel 251) [x86_64-darwin12.4.0]
INSTALLATION DIRECTORY: /Users/Jony/.rvm/gems/ruby-2.0.0-head
RUBY EXECUTABLE: /Users/Jony/.rvm/rubies/ruby-2.0.0-head/bin/ruby
EXECUTABLE DIRECTORY: /Users/Jony/.rvm/gems/ruby-2.0.0-head/bin
RUBYGEMS PLATFORMS:
  ruby
  x86_64-darwin-12
GEM PATHS:
   /Users/Jony/.rvm/gems/ruby-2.0.0-head
   /Users/Jony/.rvm/gems/ruby-2.0.0-head@global
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :backtrace => false
   :bulk_threshold => 1000
REMOTE SOURCES:
   https://rubygems.org/
----------------------
IDE: JetBrains RubyMine 5.4.3.2.1, build #RM-129.861
OS: Mac OS X 10.8.4[x86_64]
Java: 1.6.0_51-b11-456-11M4508
RubyMine SDK Environment:
Sdk: RVM: ruby-2.0.0-head
Sdk Version: ver.2.0.0p251 p251
Ruby Interpreter: /Users/Jony/.rvm/rubies/ruby-2.0.0-head/bin/ruby
RVM Sdk: yes, gemset:[default]
RVM Home: /Users/Jony/.rvm
Sdk Language Level: 1.9
Sdk Load Path:
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby/2.0.0
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby/2.0.0/x86_64-darwin12.4.0
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby/2.0.0
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin12.4.0
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/2.0.0
     ~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/2.0.0/x86_64-darwin12.4.0
     /Applications/RubyMine.app/rubystubs20
Sdk Gem paths: 
     ~/.rvm/gems/ruby-2.0.0-head/bundler/gems
     ~/.rvm/gems/ruby-2.0.0-head/gems
     ~/.rvm/gems/ruby-2.0.0-head@global/gems
Gems used for 'untitled4':
     sprockets-rails (2.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sprockets-rails-2.0.0
     activerecord (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/activerecord-4.0.0
     rack-test (0.6.2)
         ~/.rvm/gems/ruby-2.0.0-head/gems/rack-test-0.6.2
     activesupport (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/activesupport-4.0.0
     coffee-script-source (1.6.3)
         ~/.rvm/gems/ruby-2.0.0-head/gems/coffee-script-source-1.6.3
     turbolinks (1.2.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/turbolinks-1.2.0
     bundler (1.3.5)
         ~/.rvm/gems/ruby-2.0.0-head@global/gems/bundler-1.3.5
     activemodel (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/activemodel-4.0.0
     mail (2.5.4)
         ~/.rvm/gems/ruby-2.0.0-head/gems/mail-2.5.4
     rack (1.5.2)
         ~/.rvm/gems/ruby-2.0.0-head/gems/rack-1.5.2
     json (1.8.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/json-1.8.0
     minitest (4.7.5)
         ~/.rvm/gems/ruby-2.0.0-head/gems/minitest-4.7.5
     tzinfo (0.3.37)
         ~/.rvm/gems/ruby-2.0.0-head/gems/tzinfo-0.3.37
     sass-rails (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sass-rails-4.0.0
     actionmailer (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/actionmailer-4.0.0
     hike (1.2.3)
         ~/.rvm/gems/ruby-2.0.0-head/gems/hike-1.2.3
     coffee-script (2.2.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/coffee-script-2.2.0
     activerecord-deprecated_finders (1.0.3)
         ~/.rvm/gems/ruby-2.0.0-head/gems/activerecord-deprecated_finders-1.0.3
     thread_safe (0.1.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/thread_safe-0.1.0
     sqlite3 (1.3.7)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sqlite3-1.3.7
     sdoc (0.3.20)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sdoc-0.3.20
     actionpack (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/actionpack-4.0.0
     tilt (1.4.1)
         ~/.rvm/gems/ruby-2.0.0-head/gems/tilt-1.4.1
     jquery-rails (3.0.2)
         ~/.rvm/gems/ruby-2.0.0-head/gems/jquery-rails-3.0.2
     mime-types (1.23)
         ~/.rvm/gems/ruby-2.0.0-head/gems/mime-types-1.23
     railties (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/railties-4.0.0
     sprockets (2.10.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sprockets-2.10.0
     arel (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/arel-4.0.0
     polyglot (0.3.3)
         ~/.rvm/gems/ruby-2.0.0-head/gems/polyglot-0.3.3
     thor (0.18.1)
         ~/.rvm/gems/ruby-2.0.0-head/gems/thor-0.18.1
     rdoc (3.12.2)
         ~/.rvm/gems/ruby-2.0.0-head/gems/rdoc-3.12.2
     rake (10.1.0)
         ~/.rvm/gems/ruby-2.0.0-head@global/gems/rake-10.1.0
     coffee-rails (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/coffee-rails-4.0.0
     i18n (0.6.4)
         ~/.rvm/gems/ruby-2.0.0-head/gems/i18n-0.6.4
     multi_json (1.7.7)
         ~/.rvm/gems/ruby-2.0.0-head/gems/multi_json-1.7.7
     sass (3.2.9)
         ~/.rvm/gems/ruby-2.0.0-head/gems/sass-3.2.9
     rails (4.0.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/rails-4.0.0
     execjs (1.4.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/execjs-1.4.0
     treetop (1.4.14)
         ~/.rvm/gems/ruby-2.0.0-head/gems/treetop-1.4.14
     atomic (1.1.10)
         ~/.rvm/gems/ruby-2.0.0-head/gems/atomic-1.1.10
     erubis (2.7.0)
         ~/.rvm/gems/ruby-2.0.0-head/gems/erubis-2.7.0
     uglifier (2.1.1)
         ~/.rvm/gems/ruby-2.0.0-head/gems/uglifier-2.1.1
     jbuilder (1.4.2)
         ~/.rvm/gems/ruby-2.0.0-head/gems/jbuilder-1.4.2
     builder (3.1.4)
         ~/.rvm/gems/ruby-2.0.0-head/gems/builder-3.1.4

And also a screen shot of my SDK settings just in case:

enter image description here

4

6 回答 6

22

No Rails SDK found通过以下方式解决了这个问题。

第 1 步。 找出项目的 Ruby 版本和捆绑版本。 步骤 2. 从 Rubymine 的首选项中添加正确的 Ruby SDK 和 GEM。Preferences > Languages & Framework > Ruby SDK and Gems > [Select your RVM version] > [Select correct gem version of bundle] > Apply 我的项目的 Ruby 和捆绑版本信息

在此处输入图像描述

于 2017-08-25T07:37:25.897 回答
5

我通过从 RubyMine 的历史记录中删除项目(关闭项目,然后点击x左侧的项目)并删除我的项目的 .idea 目录解决了这个问题。在我再次在 RubyMine 中打开项目后,它工作了。

于 2017-10-29T11:06:53.240 回答
0

我通过安装另一个 Ruby 版本解决了这个问题,并将其安装在全局文件中

/user/share/rvm/rubies/ruby-2.5.1

我第一次在本地 rvm 文件中安装最新的 Ruby 版本时,所有 gem 文件都没有添加到 Rubymine 中,它只包含一些基本的 ruby​​ 文件。

~/.rvm/rubies/ruby-2.6.3

我不知道为什么会这样,但我认为我不需要知道原因,至少现在是这样。

于 2019-05-06T16:16:49.563 回答
0

如果@atul_vaibhai 的回答不起作用。

关闭所有打开的终端和您的项目并打开您的项目

于 2020-01-29T05:33:37.407 回答
0

卸载任何新版本的 ruby​​,而不是您的应用程序所需的版本。

rvm remove <other versions>

如果这解决了您的问题,那么您需要弄清楚如何在不影响任何其他应用程序的情况下并行保留另一个版本。您在配置应用程序时一定做错了什么。

于 2021-12-12T04:26:38.303 回答
-2

在没有更新任何内容的情况下出现相同的错误消息。 使缓存/重新启动无效对我有用。

无效的CachInMenuue.png

于 2019-08-14T08:04:18.997 回答