Export Setup Wizard can't find xcpretty
-
@Christoph-Hart My
gem list
command shows hundreds of gems (I'm a Ruby on Rails dev) and xcpretty is definitely on the list.$ gem list *** LOCAL GEMS *** abbrev (default: 0.1.0) actioncable (7.0.4) ... whenever (1.0.0) xcpretty (0.3.0) xpath (3.2.0) ... zlib (default: 2.1.1)
-
@dannytaurus haha you broke the matrix! I've committed a change that uses
gem list xcpretty
so that it won't clog the output with all gems. It still works for me, but please test it again on your machine as I don't feel like installing 100s of gems to test this out :) -
@Christoph-Hart Thanks for the update but that didn't fix it I'm afraid.
It might be to do with where HISE is looking for the gem.
I use a Ruby version manager to install and switch between multiple different Ruby versions.
The
gem env
command shows the various paths where gems are installed on my system.I realize HISE probably just runs a simple
gem list xcpretty
command but if that's looking in the wrong directory it won't find it - even though for me it shows as installed.I hope that makes sense?
$ gem env RubyGems Environment: - RUBYGEMS VERSION: 3.4.6 - RUBY VERSION: 3.1.3 (2022-11-24 patchlevel 185) [arm64-darwin22] - INSTALLATION DIRECTORY: /Users/dan/.gem/ruby/3.1.3 - USER INSTALLATION DIRECTORY: /Users/dan/.gem/ruby/3.1.0 - RUBY EXECUTABLE: /Users/dan/.rubies/ruby-3.1.3/bin/ruby - GIT EXECUTABLE: /opt/homebrew/bin/git - EXECUTABLE DIRECTORY: /Users/dan/.gem/ruby/3.1.3/bin - SPEC CACHE DIRECTORY: /Users/dan/.gem/specs - SYSTEM CONFIGURATION DIRECTORY: /Users/dan/.rubies/ruby-3.1.3/etc - RUBYGEMS PLATFORMS: - ruby - arm64-darwin-22 - GEM PATHS: - /Users/dan/.gem/ruby/3.1.3 - /Users/dan/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => true - :bulk_threshold => 1000 - "gem" => "--no-document" - REMOTE SOURCES: - https://rubygems.org/ - SHELL PATH: - /Users/dan/.gem/ruby/3.1.3/bin - /Users/dan/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0/bin - /Users/dan/.rubies/ruby-3.1.3/bin - /Users/dan/rubyonmac - /opt/homebrew/bin - /opt/homebrew/sbin - /usr/local/bin - /System/Cryptexes/App/usr/bin - /usr/bin - /bin - /usr/sbin - /sbin - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin - /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin - /Library/Apple/usr/bin - /Users/dan/.local/bin - /Users/dan/.local/bin
-
@Christoph-Hart I checked $GEM_HOME and $GEM_PATH and they point to the Ruby 3.1.3 directory, where xcpretty is installed.
$ echo $GEM_HOME /Users/dan/.gem/ruby/3.1.3 $ echo $GEM_PATH /Users/dan/.gem/ruby/3.1.3:/Users/dan/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0 $ gem which xcpretty /Users/dan/.gem/ruby/3.1.3/gems/xcpretty-0.3.0/lib/xcpretty.rb
I also installed xcpretty for every Ruby version I have on my machine, in case HISE is using a different Ruby.
It still didn't fix the issue.
$ chruby ruby-2.6.10 ruby-2.7.0 ruby-2.7.2 ruby-2.7.7 ruby-3.1.2 * ruby-3.1.3 ruby-3.2.0 ruby-3.3.2 ruby-3.3.3
-
I should also point out that even though the Export Setup Wizard can't detect xcpretty, exporting a plugin from the Export > Export as Instrument menu item works fine
-
-
@Christoph-Hart Just came back to look at this and finally solved it!
HISE uses the system Ruby version to look for xcpretty.
If you're using a Ruby version manager like rvm, Rbenv, ASDF or chruby you'll need to switch to the system Ruby to install xcpretty.
I use chruby so I did:
$ chruby system // or however your version manager switches to system Ruby // Confirm I'm using the system Ruby $ ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23] $ which ruby /usr/bin/ruby // Install xcpretty for the system Ruby $ sudo gem install xcpretty Password: ******** Fetching rouge-2.0.7.gem Fetching xcpretty-0.3.0.gem Successfully installed rouge-2.0.7 Successfully installed xcpretty-0.3.0 2 gems installed // Run the same command that HISE runs to make sure it's there $ gem list xcpretty *** LOCAL GEMS *** xcpretty (0.3.0)
-
-
-
@dannytaurus Might be worth adding this to the docs somewhere, maybe we should add a troubleshooting section for common issues.
-
@d-healey Yeah, good idea. I haven't contributed to the docs yet. Is it just a PR to the docs repo?
-
-
@dannytaurus Excellent, I was wondering why it wasn't found on my system too