Request: Ruby and RubyGems in the iosbinpack

Used for discussing the various tools in the book as well as encouraging members to share tools

Request: Ruby and RubyGems in the iosbinpack

Postby minicoin » Fri Mar 25, 2016 6:29 pm

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
minicoin
 
Posts: 20
Joined: Fri Mar 25, 2016 3:39 pm
Location: Newport News, VA

Re: Request: Ruby and RubyGems in the iosbinpack

Postby morpheus » Sat Mar 26, 2016 12:08 am

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)
morpheus
Site Admin
 
Posts: 530
Joined: Thu Apr 11, 2013 6:24 pm

Re: Request: Ruby and RubyGems in the iosbinpack

Postby minicoin » Sat Mar 26, 2016 1:33 am

Nice, but I still use an armv7 device, so I'd like a universal binary.
minicoin
 
Posts: 20
Joined: Fri Mar 25, 2016 3:39 pm
Location: Newport News, VA

Re: Request: Ruby and RubyGems in the iosbinpack

Postby morpheus » Sat Mar 26, 2016 1:59 am

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
morpheus
Site Admin
 
Posts: 530
Joined: Thu Apr 11, 2013 6:24 pm

Re: Request: Ruby and RubyGems in the iosbinpack

Postby minicoin » Sat Mar 26, 2016 2:31 am

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.
minicoin
 
Posts: 20
Joined: Fri Mar 25, 2016 3:39 pm
Location: Newport News, VA

Re: Request: Ruby and RubyGems in the iosbinpack

Postby morpheus » Sat Mar 26, 2016 3:34 pm

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.
morpheus
Site Admin
 
Posts: 530
Joined: Thu Apr 11, 2013 6:24 pm

Re: Request: Ruby and RubyGems in the iosbinpack

Postby minicoin » Sat Mar 26, 2016 4:09 pm

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$
minicoin
 
Posts: 20
Joined: Fri Mar 25, 2016 3:39 pm
Location: Newport News, VA

Re: Request: Ruby and RubyGems in the iosbinpack

Postby morpheus » Sat Mar 26, 2016 4:43 pm

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?
morpheus
Site Admin
 
Posts: 530
Joined: Thu Apr 11, 2013 6:24 pm

Re: Request: Ruby and RubyGems in the iosbinpack

Postby minicoin » Sun Mar 27, 2016 6:25 pm

Okay, it seems like setting
Code: Select all
sudo gem sources -a http://rubygems.org
fixed the SSL issues. Gems install fine and all.
minicoin
 
Posts: 20
Joined: Fri Mar 25, 2016 3:39 pm
Location: Newport News, VA

Re: Request: Ruby and RubyGems in the iosbinpack

Postby morpheus » Sun Mar 27, 2016 8:07 pm

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.
morpheus
Site Admin
 
Posts: 530
Joined: Thu Apr 11, 2013 6:24 pm

Next

Return to Tools

Who is online

Users browsing this forum: No registered users and 1 guest