Closed nealmcb closed 8 years ago
Neal,
I think there is a bug here. Confirm behaviour on Ubuntu that you find.
For the record the Ubuntu install Sonic Pi does indeed use different locations for the example files, as it follows the the requirements Debian and Ubuntu to produe a ppa and utimately a .deb package for inclusion in the official repositories. SP works out the location internally.
I think that if you enter and run
puts etc_path+”/examples”
it will give you the answer for the version you are running. On Mac and Pi it is
You may find it instructive to study the relevant section in the file < sonic-pi>/app/server/bin/qt-doc.rb around lines 177-196 (in the latest version: May differ slightly ) which shows how the documented examples are built from the actual files used. Again in the Ubuntu ppa the locations are different. Hope this helps. Robin
On 16 May 2016, at 04:24, Neal McBurnett notifications@github.com wrote:
load_example works on my Raspberry Pi 3. But it fails on Ubuntu, installed via http://ppa.launchpad.net/sonic-pi/ppa/ubuntu/.
I can still autocomplete fine. E.g. entering load_example and the space bar gives me a menu with e.g. :acid. But when I Run that, I get
Error - no example found with name: :acid
On the Raspberry Pi 3 I find the examples in e.g. /opt/sonic-pi//etc/examples/magician/wob_rhyth.rb
I can't find the similar file anywhere on Ubuntu, including in the place that the code is looking in, /usr/lib/etc/examples, which doesn't seem like the right place anyway.
Puzzling....
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub
Thanks. I'll fix that for the Ubuntu package.
on investigation it looks like the ppa does NOT include the examples files, but merely the html versions in the help files. the load_examples command looks for the original examples files from which the html ones were produced, and since they are not there can't find them. I also have a build for Ubuntu which uses the original layout of files all within the sonic-pi home directory and this does work with the load_examples command. I think @hzulla will need to sort this out.
Fixed with 2.10.0~repack-2 in Debian und Ubuntu. Thanks for reporting this.
load_example works on my Raspberry Pi 3. But it fails on Ubuntu, installed via http://ppa.launchpad.net/sonic-pi/ppa/ubuntu/ with version 2.10.0~repack-1~trusty3
I can still autocomplete fine. E.g. entering
load_example
and the space bar gives me a menu with e.g.:acid
. But when I Run that, I getOn the Raspberry Pi 3 I find the examples in e.g. /opt/sonic-pi//etc/examples/magician/wob_rhyth.rb
I can't find the similar file anywhere on Ubuntu, including in the place that the code is looking in,
/usr/lib/etc/examples
, which doesn't seem like the right place anyway.Puzzling....