Ruby SDK defined but still says "No such file to load" when requiring standard library

Answered

While using the Ruby plugin in IntelliJ Ultimate, I was trying to require standard libraries and it is telling me "No such file to load".

When I am typing the standard library into the editor, the IDE is suggesting the library, but when I hit enter, it writes the rest of the name and then underlines it with the error "No such file to load".

Here's my IntelliJ info:

 

IntelliJ IDEA 2017.3.4 (Ultimate Edition)
Build #IU-173.4548.28, built on January 29, 2018
JRE: 1.8.0_152-release-1024-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

And ruby info:

RUBYGEMS VERSION: 2.6.13
RUBY VERSION: 2.4.2 (2017-09-14 patchlevel 198) [x64-mingw32]
INSTALLATION DIRECTORY: C:/Ruby24-x64/lib/ruby/gems/2.4.0
USER INSTALLATION DIRECTORY: C:/Users/gbianchetdavid/.gem/ruby/2.4.0
RUBY EXECUTABLE: C:/Ruby24-x64/bin/ruby.exe
EXECUTABLE DIRECTORY: C:/Ruby24-x64/bin
SPEC CACHE DIRECTORY: C:/Users/gbianchetdavid/.gem/specs
SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
RUBYGEMS PLATFORMS:
ruby
x64-mingw32
GEM PATHS:
C:/Ruby24-x64/lib/ruby/gems/2.4.0
C:/Users/gbianchetdavid/.gem/ruby/2.4.0
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
https://rubygems.org/
SHELL PATH:
C:\Ruby24-x64\bin
C:\Ruby24-x64\lib\ruby\gems\2.4.0\bin
C:\ProgramData\Oracle\Java\javapath
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\Windows\CCM
C:\Program Files (x86)\Sennheiser\SoftphoneSDK\
C:\Program Files\nodejs\
C:\Program Files\Git\cmd
C:\WINDOWS\system32\config\systemprofile\.dnx\bin
C:\Program Files\Microsoft DNX\Dnvm\
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
C:\Ruby24-x64\bin
C:\Users\gbianchetdavid\AppData\Local\Microsoft\WindowsApps
C:\Users\gbianchetdavid\AppData\Roaming\npm
----------------------
IDE: IntelliJ IDEA 2017.3.4, build #IU-173.4548.28
OS: Windows 10 10.0[amd64]
Java: 1.8.0_152-release-1024-b11
RubyMine SDK Environment:
Sdk: ruby-2.4.2-p198
Sdk Version: ver.2.4.2p0
Ruby Interpreter: C:\Ruby24-x64\bin\ruby.exe
RVM Sdk: no
Sdk Language Level: 2.4
Sdk Load Path:
C:/Users/gbianchetdavid/.IntelliJIdea2017.3/config/plugins/ruby/rubystubs/rubystubs24
Sdk Gem paths:
C:/Users/gbianchetdavid/.gem/ruby/2.4.0/gems
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems
C:/Users/gbianchetdavid/.gem/ruby/2.4.0/bundler/gems
C:/Ruby24-x64/lib/ruby/gems/2.4.0/bundler/gems
Gems used for 'dbupdate':
minitest (5.11.3)
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/minitest-5.11.3
bundler (1.16.1)
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.16.1
rake (10.5.0)
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-10.5.0

1
5 comments

Hello,

sorry for the delay. It appears to be a known problem already fixed in 2018.1 Beta (https://youtrack.jetbrains.com/issue/RUBY-21108) We'll update the Ruby plugin so that it contains the fix as well.

2

Yeah, still a problem in 2024. Probably somewhere in the monstrous pile of settings every IntelliJ project requires

0

Nello do you mean that no external libraries are being shown for the SDK set for the project? Could you please attach a screenshot of the problem and also a screenshot from File - Project Structure - Modules.

0

My issue ended up being where and what to actually set for load path, so although running tests and code from command line worked fine but not so much from IntelliJ. I still can't get “require ‘spec_helper’” not to error no matter what I do, for example.

0

Nello so does it mean that at the moment gems are shown, but the tests are failing when you run them from IDE?

0

Please sign in to leave a comment.