Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RubyMine project Setup for plugins outside of Sketchup Folder #8

Open
Voulz opened this issue Feb 11, 2017 · 5 comments
Open

RubyMine project Setup for plugins outside of Sketchup Folder #8

Voulz opened this issue Feb 11, 2017 · 5 comments
Assignees
Labels

Comments

@Voulz
Copy link

Voulz commented Feb 11, 2017

Hi,

I tried to setup a RubyMine project based on the wiki which was nicely explaining everything step by step, but I wasn't able to actually load the sketchup script I made. It took me a while to get that Sketchup wouldn't load my script because it was outside of the plugin directory.

As the example in the wiki actually point to the folder "C:\Users\tthomas2\SourceTree\testup-2" (as seen here), I was thinking that RubyMine was telling Sketchup a way or another to load my plugin.

Then I found this page explaining that I need a rb file inside of my plugin folder that adds my plugin folder to the $LOAD_PATH.

Anyway, I feel like this should be part of the wiki for the next person to wonder here to know about that.

@thomthom
Copy link
Member

Oh! Yes, absolutely - that is a critical omission from the tutorial. Thank you for reporting that!

@thomthom thomthom self-assigned this Feb 11, 2017
@thomthom thomthom added the bug label Feb 11, 2017
@thomthom
Copy link
Member

By the way, yesterday I found a better way to provide code insight to RubyMine;

  1. Remove the folder reference your cloned version of: https://github.com/SketchUp/ruby-api-stubs
  2. Add a Gemfile in your root of your project folder. (Yes, with no file extension)
source 'https://rubygems.org'

group :development do
  gem 'minitest'
  gem 'sketchup-api-stubs'
end

RubyMine should then detect that your project rely on those gems and install them for you. This have the benefit of not needing to add require "sketchup.rb" on top of each file just to be able to get auto-complete from RubyMine.

@Voulz
Copy link
Author

Voulz commented Feb 11, 2017

Seems interesting, I'll check that when I have time!

@DanRathbun
Copy link

@thomthom (again) I feel this issue was not a "Ruby API Tutorials" issue.
This issue should be moved to the Debugger or a new repo on using VSCode or other IDEs.

@burncode
Copy link

After a long time of unsuccessful debugging, we finally found the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants