RubyMine error of No Rails Found in the SDK
Asked Answered
H

7

32

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

Hafner answered 7/7, 2013 at 22:15 Comment(3)
Looks like youtrack.jetbrains.com/issue/RUBY-13774.Alarmist
gem install rails fixed our problem.Balkanize
Did you set the correct ruby version in the Gemfile?Lido
P
28

I solved this issue of No Rails SDK found by following.

Step 1. Figure out Ruby version and bundle version of your project. Ruby and bundle version info of my project

Step 2. Add correct Ruby SDK and GEMs from preferences in Rubymine. Preferences > Languages & Framework > Ruby SDK and Gems > [Select your RVM version] > [Select correct gem version of bundle] > Apply enter image description here

Paphlagonia answered 25/8, 2017 at 7:37 Comment(2)
To see your bundler version run '$ bundle -v'.Palpitant
I have already added the same rbenv folder but RubyMine didn't recognize the newly installed bundler version, not even after restarting the IDE. But sitting up rbenv again (pointing to the same folder) was solving the issue (I could see the proper bundler version then in the list, and the server was also starting without issues with the newly added rbenv - which is weird but that's what happened).Litharge
K
6

I solved this problem by deleting the project from RubyMine's history (close project and then hit the x for the project on the left side) and deleting the .idea directory of my project. After I opened the project in RubyMine again, it worked.

Katleen answered 29/10, 2017 at 11:6 Comment(1)
Deleting the .idea folder deletes all project settings.Lido
G
1

If the answer by @atul_vaibhai doesn't work.

Close any open terminals and your project and open your project

Gaffe answered 29/1, 2020 at 5:33 Comment(0)
T
0

I solved this by installed another Ruby version ,and it installed in Global file

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

The first time I installed the latest Ruby version in my local rvm file, all gem files didn't add in Rubymine which only contains some base ruby files.

~/.rvm/rubies/ruby-2.6.3

I don't know why is that,but I don't think I need to know the reason, at least now.

Topgallant answered 6/5, 2019 at 16:16 Comment(0)
H
0

Uninstall any new versions of ruby than the one that your application requires.

rvm remove <other versions>

If this solves your problem, then you need to figure out how to parallely keep another version without affecting any other application. You must be doing something wrong in configuring the application.

Hearty answered 12/12, 2021 at 4:26 Comment(0)
E
0

I'm using RubyMine 2023.3.2 in Windows 11 using WSL. The solution is in..

Settings/Languages & Frameworks/Ruby SDK and Gems.

I've got just one Ruby SDK which is a remote interpreter. In the Right Hand Pane, click on the download icon. It takes a few moments to "Synchronize gems and RubyMine helper files" Click OK. It now knows about the rails gem in the interpreter.

Can now run the Server.

Remove interpreter with list of gems

Thanks to vaibhavatul47 for his answer which led me to the correct place. The other answers which suggest you remove and recreate the project will work because on the second iteration you add the remote interpreter after you have done a bundle install. I think this problem comes from having to set up the remote interpreter before the initial bundle install, so you then have to refresh the interpreter with the full list of gems.

Erlond answered 28/1 at 13:59 Comment(0)
H
-1

Had the same error message without updating anything. Invalidating the Cache / Restart worked for me.

InvalidCachInMenue.png

Halbeib answered 14/8, 2019 at 8:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.