Hello,
I've got problem with 3.2.2 version (portable and msi install) of Sonic Pi. Version 3.1.0 works fine.
I get this error message:
C:\Users\Roland\.sonic-pi\log\gui.log
[GUI] - Welcome to the Sonic Pi GUI
[GUI] - ===========================
[GUI] -
[GUI] - {dace7197-1cc9-4014-b464-094922f6df7b}
[GUI] - Discovering port numbers...
[GUI] - Detecting port numbers...
[GUI] - GUI listen to server port 0
[GUI] - port: 0 [Not Available]
[GUI] - Server listen to gui port 0
[GUI] - port: 0 [Not Available]
[GUI] - Server incoming OSC cues port 0
[GUI] - port: 0 [Not Available]
[GUI] - Scsynth port 0
[GUI] - port: 0 [Not Available]
[GUI] - Server send to GUI port 0
[GUI] - port: 0 [Not Available]
[GUI] - GUI send to server port 0
[GUI] - port: 0 [Not Available]
[GUI] - Scsynth send port 0
[GUI] - port: 0 [Not Available]
[GUI] - Erlang router port 0
[GUI] - port: 0 [Not Available]
[GUI] - OSC MIDI out port 0
[GUI] - port: 0 [Not Available]
[GUI] - OSC MIDI in port 0
[GUI] - port: 0 [Not Available]
[GUI] - Websocket port 0
[GUI] - port: 0 [Not Available]
[GUI] - Critical Error. One or more ports is not available.
C:\Users\Roland\.sonic-pi\log\server-errors.log
C:\Users\Roland\.sonic-pi\log\server-output.log
C:\Users\Roland\.sonic-pi\log\scsynth.log
C:\Users\Roland\.sonic-pi\log\processes.log
Hi there, what happens if you open a terminal, navigate to this directory and run irb:
cd /Applications/Sonic\ Pi.app/Contents/Resources/app/server/native/ruby/bin
./irb
Thank you for fast replying.
I got this:
/usr/bin/env: ‘ruby’: No such file or directory
Thanks for doing this,
just to be sure, did you add the . and the / in front of ./irb. Also, could you run pwd
Sorry, I did wrong. I did it in the portable version.
Now I get this:
Roland@DESKTOP-IUQGUPQ MINGW64 /c/Program Files/Sonic Pi/app/server/native/ruby/bin
$ ./irb
irb(main):001:0>
irb(main):002:0>
Oh, sorry, for some reason I assumed you were on macOS, my apologies. It's clear from the log you sent you're running Windows 10!!
Ok, next thing to try:
cd "c:\Program Files\Sonic Pi\app\server\ruby\bin"
..\..\native\ruby\bin\ruby.exe port-discovery.rb
c:Program FilesSonic Piappserverrubybin>....nativerubybinruby.exe port-discovery.rb
Traceback (most recent call last):
15: from <internal:gem_prelude>'
14: from <internal:gem_prelude>:1:inrequire'
13: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/rubygems.rb:1397:in <top (required)>'
12: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/rubygems.rb:1397:inrequire'
11: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/rubygems/defaults/operating_system.rb:3:in <top (required)>'
10: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/singleton.rb:27:inenable_dll_search_paths'
9: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:99:in enable_dll_search_paths'
8: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:89:inmingw_bin_path'
7: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:76:in msys_path'
6: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:48:initerate_msys_paths'
5: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/win32/registry.rb:542:in open'
4: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/win32/registry.rb:435:inopen'
3: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/site_ruby/2.7.0/ruby_installer/runtime/msys2_installation.rb:49:in block in iterate_msys_paths'
2: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/win32/registry.rb:611:ineach_key'
1: from C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/win32/registry.rb:910:in export_string'
C:/Program Files/Sonic Pi/app/server/native/ruby/lib/ruby/2.7.0/win32/registry.rb:910:inencode': U+00AE to CP852 in conversion from UTF-16LE to UTF-8 to CP852 (Encoding::UndefinedConversionError)
OK, I think we already have a solution for this which will ship in the next version.
Could you do the following for me:
open C:\Program Files\Sonic Pi\app\server\native\ruby\lib\ruby\2.7.0\win32\registry.rb and replace the Encoding.find(Encoding.locale_charmap) with Encoding::UTF_8. It should be on the 72nd line.
That section should look as follows:
WCHAR = Encoding::UTF_16LE
WCHAR_NUL = "\0".encode(WCHAR).freeze
WCHAR_CR = "\r".encode(WCHAR).freeze
WCHAR_SIZE = WCHAR_NUL.bytesize
LOCALE = Encoding::UTF_8
Then see if Sonic Pi boots.
You're awesome.
It booted up well.
Thank you very much.
That's wonderful to hear!
The issue is that Ruby on Windows doesn't seem to support some language codepages such as CP852 which I'm assuming your default is - is your locale set to Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak or Slovene?
Anyway, so pleased to hear that this has fixed things for you. The next release will have this patch applied, so it should just work straight out of the box :-)
Yes, it set to Hungarian. :D
i appreciate your work!!!
Hope you have a lot of fun!
Please do consider joining our friendly community: https://in-thread.sonic-pi.net
Closing for now - please feel free to re-open if the error is not truly resolved for you.