castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
423 stars 25 forks source link

[Errno::ENOENT] No such file or directory - bundle #154

Open electr0sheep opened 4 years ago

electr0sheep commented 4 years ago

I recently cleared out my .vscode folder because another extension wasn't working right. So, as I was reconfiguring vscode, this error started occurring when solargraph is starting up. I have tried setting an absolute path to bundler, but nothing I've done has changed the file or directory it's looking for. It's always bundle. This is probably just a stupid mistake on my end, but any help will be appreciated.

I don't have any issues when I set the transport setting to external, and run solargraph in the terminal, i.e. bundle exec solargraph socket

shrikanth-bluesapling commented 4 years ago

There's another setting ("solargraph.useBundler") that, if set to true, overrides the bundle command path setting. Maybe you've accidentally enabled that/ deleting .vscode has reset it to true?

electr0sheep commented 4 years ago

I've found that if I specify an absolute path for solargraph as well as not checking use bundler, it will start properly.

Been looking into what about spawnWithBash() causes it to crap out, and I think I've identified the underlying issue. If I start solargraph by running /bin/zsh -l -c "bundle exec solargraph socket --port 0", it doesn't work. Specifically, /bin/zsh -l seems to cause chaos with my ruby setup. I think these issues may be caused by chruby, but I'd be curious to know why the -l switch is there.

For reference, the "bundle" that is causing the ENOENT is coming from this line: https://github.com/castwide/solargraph/blob/master/lib/solargraph/documentor.rb#L59