Set up for Sketchup Ruby API

I am pretty new to Ruby and totally new to RubyMine but I am working with others so I need at least to first set up my project properly. The project called namesets is in its first incarnation a plugin in to Google's Sketchup - essentially an html/javascript animated associative index in a web dialog. The web dialog is set up by Ruby code and there are callbacks and execute_script methods for interactivity. All the files are in a single directory except for a a loader file that has to be in Sketchup's plugins directory. The code seems to work OK with PC's and IE but not with Mac's and Safari (both combinations are predetermined by Google).

I am not sure how much of that is relevant because my question is why do I get this when I run an inspection:
pig 023.png
and what do I need to do?



Hello Chris,

Welcome to RubyMine!
The inspections results I can see on screenshot contains 2 groups of failed inspections.

  • Scope inspection. Local variable can be uninitialized.
    This inspection checks your program using Data Flow Analyzis and warns you about local variables which can be uninitialized before usage.
    Ruby interpreter will work well with it, but local variable can be nil.
  • Unresolved Ruby reference.
    This inspection tries to resolve references in code and warns you about unresolved. As far as Ruby is dynamic language sometime it cannot cope with some meta programming technics.



Thanks for the reply but I am still not clear what I should do to clear the warnings.

Might the second type have something to do with having only the Sketchup Ruby API?



Unfortunately Sketchup API is hidden in compiled C library thus RubyMine doesn't understand it. RubyMine is able to parse only libraries written in Ruby + standard C-based Ruby core binary libraries. Please submit an issue at It is possible to create/generate ruby stubs for Scetchup (similar which RubyMine uses internally for codeinsight related to Ruby core libraries) and it isn't too hard. At current moment this is a low priority issue and only a few users asked us to implement it.



I will try and find someone at Sketchucation better qualified to submit the issue.


It isn't a Sketchup issue or bug. Just RubyMine doesn't support binary C-compiled libs thus for good codeInsight support (completion/refactoring/go to declaration) features we need to generate fake ruby stubs which describes their API hidden in binary files


I need to find someone more conversant with coding to follow this up


I'm not sure if this exactly answers the original question, but regarding code completion and inline docs for SketchUp, there is a YARD repo here that can be used to define all the SketchUp classes:


Please sign in to leave a comment.