What is a proper way to execute ruby script from xcode build phase script?
Build phase -> Shell: change /bin/sh
to /bin/bash -l
Bash login is required, in order to load ruby variables/paths/etc.
Xcode run phase script in Ruby wrong encoding
In the end the solution seems to be to force UTF8 onto ruby
LC_ALL= LANG=en_US.UTF-8 ruby -e 'p Encoding.default_external'
export LANG=en_US.UTF-8
Use non-system ruby to execute ruby scripts within macOS App
Due to Martin R's help I was able to solve the issue.
For now I deactivated macOS sandboxing in the projects capabilities.
Now I can use any ruby I want.
Thank you
Get xcodeproj and ruby 2.7.0 into the PATH
managed to fix it with reinstalling xcodeproj and added
export PATH=/opt/homebrew/lib/ruby/gems/2.7.0/bin:$PATH
to my ~/.bash_profile
then I opened a new terminal
Run Ruby bundler gems as Xcode build scripts
There are few ways to modify OS X environment variables.
However, there's an easy workaround in this case.
In the 'run script' build stage:source ~/.bash_profile && bundle exec ...
.
Related Topics
You Don't Have Write Permissions into the /Var/Lib/Gems/1.9.1 Directory
How to Generate a Wsdl Using Ruby
How to Require a Block in Ruby
Access Ruby Hash Using Dotted Path Key String
Saml 2.0 Sso for Ruby on Rails
Getaddrinfo Error with Mechanize
Grabbing Snapshots from Webcams in Ruby
Parsing Date from Text Using Ruby
How to Evaluate a Date Difference in Years, Months and Days (Ruby)
How to Best Handle Per-Model Database Connections with Activerecord
Ruby Incorrectly Parses 2 Digit Year
Rails - How to Check for Online Users
Suppresing Output to Console with Ruby
Rails Render of Partial and Layout in Controller
Openssl Trouble with Ruby 1.9.3
Rails 3.2 Activeadmin 'Collection Is Not a Paginated Scope.' Error