Get intellisense working for a lib like Gosu

Hello,

I am making my first step into ruby world. I am trying to get intellisense working for a lib like Gosu.

In the following working example, the intellisense does not list "caption". Also, caption is underlined and when I hover the mouse, a tooltip appears with the message Cannot find 'caption=' for type 'GameWindow' .

After reading some issues on the intellij website, it is suggested to use bundler. So I did

  • bundle init in the command line
  • I added gosu in the Gemfile
  • I run bundle install in the command line
  • Everything works well

But no intellisens. I went to Tools -> Bundler -> Install and I get

/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) install
-e:1:in `load': cannot load such file -- install (LoadError)
    from -e:1:in `<main>'

Process finished with exit code 1

Is there any suggestion to make the intellisense working?

Thank you!

 

require 'gosu'

class GameWindow < Gosu::Window

def initialize(width=320, height=240, fullscreen=false)
super
self.caption = 'Hello Movement'
end
end

window = GameWindow.new
window.show

OS: Fedora 27

RUBYGEMS VERSION: 2.6.14.1
RUBY VERSION: 2.4.3 (2017-12-14 patchlevel 205) [x86_64-linux]
INSTALLATION DIRECTORY: /home/sderrico/.gem/ruby
USER INSTALLATION DIRECTORY: /home/sderrico/.gem/ruby
RUBY EXECUTABLE: /usr/bin/ruby
EXECUTABLE DIRECTORY: /home/sderrico/bin
SPEC CACHE DIRECTORY: /home/sderrico/.gem/specs
SYSTEM CONFIGURATION DIRECTORY: /etc
RUBYGEMS PLATFORMS:
  ruby
  x86_64-linux
GEM PATHS:
   /home/sderrico/.gem/ruby
   /usr/share/gems
   /usr/local/share/gems
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :backtrace => false
   :bulk_threshold => 1000
REMOTE SOURCES:
   https://rubygems.org/
SHELL PATH:
   /usr/bin
   /usr/lib64/qt-3.3/bin
   /usr/local/bin
   /usr/local/sbin
   /usr/bin
   /usr/sbin
   /home/sderrico/.local/bin
   /home/sderrico/bin
----------------------
IDE: RubyMine 2018.1.2, build #RM-181.4668.84
OS: Linux 4.15.17-200.fc26.x86_64[amd64]
Java: 1.8.0_152-release-1136-b29
RubyMine SDK Environment:
Sdk: ruby-2.4.3-p205
Sdk Version: ver.2.4.3p0
Ruby Interpreter: /usr/bin/ruby
RVM Sdk: no
RVM Home: [n/a]
Sdk Language Level: 2.4
Sdk Load Path:
     /opt/ruby-mine/rubystubs24
Sdk Gem paths:
     ~/.gem/ruby/gems
     /usr/share/gems/gems
     /usr/local/share/gems/gems
     ~/.gem/ruby/bundler/gems
     /usr/share/gems/bundler/gems
     /usr/local/share/gems/bundler/gems
Gems used for 'hero':
     bundler (1.16.1)
         ~/.gem/ruby/gems/bundler-1.16.1
     gosu (0.13.3)
         ~/.gem/ruby/gems/gosu-0.13.3

1 comment

Bundler start to work after installing RVM.

0

Please sign in to leave a comment.