sonic-pi-vscode-editor icon indicating copy to clipboard operation
sonic-pi-vscode-editor copied to clipboard

Cannot get server loaded: `The Sonic Pi root path is not properly configured.`

Open drewgbarnes opened this issue 3 years ago • 5 comments

[GUI] - Cleaning old sessions...
[GUI] - Discovering port numbers...
stderr: /Applications/Sonic Pi.app/Contents/Resources/app/server/native/ruby/bin/ruby: Not a directory -- /Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb (LoadError)

I have tried setting the sonicPiRootDirectory in the extension preferences and in the settings.json inside the examples directory, with variations on the empty string in Sonic Pi.app to no avail.

image image

drewgbarnes avatar Nov 12 '22 16:11 drewgbarnes

Thanks for the help, I would love to be able to edit sonic pi code and run it easily from VSCode, the editor inside the Sonic Pi app is rough!

drewgbarnes avatar Nov 12 '22 16:11 drewgbarnes

Turns out I needed to double escape the space in it. So setting it like this worked:

"/Applications/Sonic\\ Pi.app/Contents/Resources"

However, the startup is hanging in initAndCheckPorts here

I am not sure I want to dig into that right now

drewgbarnes avatar Nov 12 '22 16:11 drewgbarnes

Hi @drewgbarnes

I just tried this plugin today and found it not to work. It doesn’t work with sonic pi v4.3 and looks like it isn't compatible with 4.x in general.

This is because

/Applications/Sonic Pi.app/Contents/Resources/app/server/ruby/bin/sonic-pi-server.rb

doesn’t exist, I mean the file sonic-pi-server.rb doesn’t exist. There seems to be a new file called spider-server.rb a new server maybe?

I tried to create a symbolic link so sonic-pi-server.rb points to spider-server.rb This got me further but crashed out with errors I would guess spider-server.rb’s API is just too different?

Generally, with software lifecycles, a major version update (e.g 3->4) you can expect major API changes.

So it looks like this plugin needs to be updated for sonic pi v4.x ?

or in the meantime you could try rolling back to sonic pi 3.x ?

I have raised a ticket #24

andrewcrook avatar Dec 15 '22 15:12 andrewcrook

scripts like

port-discovery.rb which the extension calls are no longer available in v4.x so it can not find the port to connect. Looks like it needs to work with a completely different setup.

andrewcrook avatar Dec 15 '22 15:12 andrewcrook

Any news on this? It is now September 5th 2023...

carlca avatar Sep 05 '23 18:09 carlca