Page 1 of 2

Request: Ruby and RubyGems in the iosbinpack

PostPosted: Fri Mar 25, 2016 6:29 pm
by minicoin
Hey J, I've looked all across the Internet for a working version of Ruby for iOS, but I haven't been able to find one. saurik's version is horribly outdated (it doesn't work on iOS 9+), and the iNinjas one doesn't work either :/

Thanks, Avery

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 12:08 am
by morpheus
Is this what you mean?


http://NewOSXBook.com/tools/iOSBinaries/ruby-arm64.tgz

(test it and get back to me - I never actually use ruby)

(you might need to symlink to /usr/local/ruby/bin/ruby or put in your PATH)

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 1:33 am
by minicoin
Nice, but I still use an armv7 device, so I'd like a universal binary.

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 1:59 am
by morpheus
Picky, picky :-P

Crap. it took some creative ingenuity to get that far from v8. Test it on a 64-bit first? that way I don't have to tweak my hacks twice..

Edit: Also posted this https://twitter.com/Morpheus______/stat ... 0607295489 - maybe someone would like to try and test? Please use this thread to notify me of bugs. If there aren't any, I can recompile 32-bit version too

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 2:31 am
by minicoin
I got a tester on 64-bit to try and test it -- it initially wasn't signed but that wasn't a huge deal.

Bugs:

gem install sass returns the following:

Code: Select all
iPhoney:/usr/local/ruby/bin root# ./gem install sass
ERROR:  Loading command: install (LoadError)
        failed to load encoding (Windows-31J)
ERROR:  While executing gem … (NoMethodError)
    undefined method `invoke_with_build_args’ for nil:NilClass
iPhoney:/usr/local/ruby/bin root#


I forgot to add: is this iOS 7+ only? I don't really care if it is or isn't, just curious.

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 3:34 pm
by morpheus
Sorry.. some encodings compiled as x86_64 by mistake. Fixed

Try again (http://NewOSXBook.com/tools/iOSBinaries/ruby-arm64.tgz)

And let me know. An armv7 version will be compiled soon.

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 4:09 pm
by minicoin
More errors!

Code: Select all
iPhoney:/usr/local/ruby/bin mobile$ ./ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [armv8-darwin14]
iPhoney:/usr/local/ruby/bin mobile$ ./gem install sass
ERROR:  While executing gem … (Gem::Exception)
    Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
iPhoney:/usr/local/ruby/bin mobile$

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sat Mar 26, 2016 4:43 pm
by morpheus
Ack. That'll take me a while. Compiling OpenSSL for iOS is like the worst experience ever.
If you can try http:// and other non-ssl functionality in the meanwhile, please keep testing?

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sun Mar 27, 2016 6:25 pm
by minicoin
Okay, it seems like setting
Code: Select all
sudo gem sources -a http://rubygems.org
fixed the SSL issues. Gems install fine and all.

Re: Request: Ruby and RubyGems in the iosbinpack

PostPosted: Sun Mar 27, 2016 8:07 pm
by morpheus
Good. I'll eventually get openssl working, I hope. I need it for Perl and PHP (coming soon). Ruby should be stable, then, and so I'll get on a 32-bit version for everyone.