I am building a Mac OS X app and I have Ruby included in the app. To do this I include Ruby in the app.
When I test my app on my local machine it works fine with my RVM controlled Ruby
When I use the compiled Ruby by changing my environment variables I get the following error (foreman loads the environment variables)
$ pry
[1] pry(main)> Encoding
=> Encoding
[2] pry(main)> exit
$ foreman run pry
[1] pry(main)> Encoding
Encoding::ConverterNotFoundError: code converter not found (US-ASCII to UTF-8 with universal_newline)
from /Users/niko/Library/Developer/Xcode/DerivedData/MyApp-atvlxcrcyyiwmnfbcopifumvguqz/Build/Products/Debug/MyApp/Contents/Resources/server/vendor/ruby/1.9.1/gems/coderay-1.0.7/lib/coderay/scanner.rb:111:in `encode'
[2] pry(main)>
Basically what happened, for whomever is finding this problem, is that the Ruby version I was missing certain files.
This happened to me because of the shear number of files being processed via Git (there was a maximum number of renamed files or something)
To resolve this I put a compressed file in the repository instead of the /ruby/ folder
Then when I expanded the compressed source code and rebuilt with
make && make installRuby stopped throwing these errors.