No Rspec gem found in sdk via IntelliJ
I am trying to create a project to work with which was built with RubyMine. I have the final version of IntelliJ and would rather use that with a Ruby plugin to run these tests.
However, when I try to run, I get the error "No Rspec gem found in SDK". I havent
My Gem environment looks like this:
mac:~ cmietzner$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.7
- RUBY VERSION: 2.2.1 (2015-02-26 patchlevel 85) [x86_64-darwin14]
- INSTALLATION DIRECTORY: /Users/colemietzner/.rvm/gems/ruby-2.2.1
- RUBY EXECUTABLE: /Users/colemietzner/.rvm/rubies/ruby-2.2.1/bin/ruby
- EXECUTABLE DIRECTORY: /Users/colemietzner/.rvm/gems/ruby-2.2.1/bin
- SPEC CACHE DIRECTORY: /Users/colemietzner/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-14
- GEM PATHS:
- /Users/colemietzner/.rvm/gems/ruby-2.2.1
- /Users/colemietzner/.rvm/gems/ruby-2.2.1@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/colemietzner/.rvm/gems/ruby-2.2.1/bin
- /Users/colemietzner/.rvm/gems/ruby-2.2.1@global/bin
- /Users/colemietzner/.rvm/rubies/ruby-2.2.1/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/git/bin
- /Users/colemietzner/.rvm/bin
source to share
Your problem is that IntelliJ has created your mobile as a Java oriented module. The little blue square next to the module name can be identified.
This fixed it for me:
- Open Project Structure
- Click Modules under Project Settings
- Remove module (via - )
- Add a new module and select Ruby (or rails or whatever you need)
source to share
I realize this is an old question, but I ran into the same problem and solved it this way:
Problem:
On the intelliJ config screen shown in the screenshot above (see Run> Edit Configs), you can see that the setting is using Select SDK from Module. And of course there are no Ruby executables inside the module (project directory), so it throws a "No SDK found" error.
Decision:
(Assuming all matching gems were $ bundle install
'd) I found the solution to select "Use other SDKs and" rspec "gem:" and select the appropriate SDK. BUT , so that this applies to the whole project, I've reproduced this change in the Default Ruby and RSpec settings.
for example for Ruby settings:
source to share