Open renchiyuan opened 5 years ago
Are you getting this error from one of the examples? Can you post the full error, including the backtrace?
What version of SketchUp? What platform? Windows or Mac?
I think I have similar issue here. After setting VSCode on win10 according to wiki I'm getting "Required path extensions.rb could not be resolved." from solargraph. I'm using Sketchup 2018
I think I have similar issue here. After setting VSCode on win10 according to wiki I'm getting "Required path extensions.rb could not be resolved." from solargraph. I'm using Sketchup 2018
@bkvsy - what does your .solargraph.yml
file look like?
It would need to have a path to the SketchUp Tools directory where this file is located. See example in the VSCode project example we recently created:
Link to the front page of the VSCode example repository: https://github.com/SketchUp/sketchup-extension-vscode-project
Oh, just noticed the comment that sketchup.rb
isn't flagged. If you jump to that file (F12 when you have the caret set to that line) what file does VSCode open?
@thomthom my .solargraph.yml was copied from the Wiki
I'm maybe doing something wrong here but pressing F12 in VS in any configuration produces no results.
Surprisingly, when I copied your sketchup-extension-vscode-project repo and changed require_paths in .solargraph.yml to some random path on different drive and added random .rb in 'require' section Solargraph is not reacting.
Surprisingly, when I copied your sketchup-extension-vscode-project repo and changed require_paths in .solargraph.yml to some random path on different drive and added random .rb in 'require' section Solargraph is not reacting.
Is there any message in the statusbar about Solargraph not starting?
I some times open the VSCode Developer Console to check for hints to errors preventing solargraph from starting. (Help > Toggle Developer Tools
)
Do you see any hints there?
Btw, what version of Ruby and the Solargraph gem do you have installed?
Ruby version 2.5.3p105 Solargraph 0.31.3
Warnings from dev tools:
Hm... that is strange. I don't see any issues there.
Could you perhaps zip you a minimal example where the require 'extensions.rb'
isn't working and attach it here? Maybe there is some subtle difference in our configs...
I'm seeing the same thing on my machine. I'll dig into and see if I can figure out what is going on.
Turns out I've gone through this before - I'd just forgotten.
Currently solargraph expects the require_paths
to be relative to the .solargraph.yml
file. So the Program Files path doesn't do anything right now.
And in my own projects and the VSCode example (https://github.com/SketchUp/sketchup-extension-vscode-project/blob/master/.solargraph.yml) the require_not_found
reporter is excluded from the set of reporters. Only rubocop is enabled.
reporters:
- rubocop
Thank you sensei @thomthom Copying references from .../Tools/ to the repository path is working for me
@thomthom So apparently this issue was solved. But (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.
Need help. I don't know what is wrong. require "extensions.rb" cant find the file. But require "sketchup.rb" is right.