我更新了Ruby 2.0和Rails 4.0,RubyMine停止了工作。
如果我通过命令行工具执行Rails命令,它们工作得很好但是如果我想通过RubyMine(最新版本)运行我的项目,则会出现error 134
和No Rails Founds in the SDK
错误。
所以我确信这不是什么大不了的事情,它只是一些需要在IDE中更新但却无法解决的小设置。并且不确定我需要提供什么样的细节,所以这里是工具 - >从IDE显示Gem Environment 信息:
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
还有我的SDK设置的屏幕截图,以防万一:
答案 0 :(得分:8)
我通过以下方式解决了No Rails SDK found
的问题。
第1步。
找出项目的Ruby版本和捆绑版本。
第2步。
从Rubymine的首选项中添加正确的Ruby SDK和GEM。
偏好>语言与框架> Ruby SDK和Gems> [选择您的RVM版本]> [选择正确的宝石版捆绑]>应用
答案 1 :(得分:1)
我通过从RubyMine的历史记录中删除项目来解决这个问题(关闭项目,然后点击左侧项目的x
)并删除项目的.idea目录。在我再次在RubyMine中打开项目后,它运行了。
答案 2 :(得分:0)
我通过安装另一个Ruby版本解决了这个问题,并将其安装在全局文件中
/user/share/rvm/rubies/ruby-2.5.1
我第一次在本地rvm文件中安装最新的Ruby版本时,所有gem文件都没有添加到Rubymine中,而Rubymine仅包含一些基本的ruby文件。
~/.rvm/rubies/ruby-2.6.3
我不知道为什么,但是至少在现在我不知道原因。
答案 3 :(得分:0)
如果@atul_vaibhai的答案不起作用。
关闭所有打开的终端和您的项目,然后打开您的项目
答案 4 :(得分:-1)