Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ rvm list
rvm rubies
jruby-9.1.5.0 [ x86_64 ]
=* ruby-2.3.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
$ irb
2.3.1 :001 > require 'rio'
=> true
2.3.1 :002 > rio('nice.jpg').binmode < rio('http://farm4.static.flickr.com/3134/3160515898_59354c9733.jpg?v=0')
=> #<Rio:0x3fccc60847b0:"nice.jpg" (Stream::Reset)>
2.3.1 :003 > rio('nice2.jpg') < rio('http://farm4.static.flickr.com/3134/3160515898_59354c9733.jpg?v=0')
=> #<Rio:0x3fccc61f1454:"nice2.jpg" (Stream::Reset)>
2.3.1 :004 > exit
$ ls -rt nice*
nice.jpg nice2.jpg
$ ls -lrt nice*
-rw-r--r-- 1 ronda staff 199369 19 Nov 07:48 nice.jpg
-rw-r--r-- 1 ronda staff 199369 19 Nov 07:49 nice2.jpg
$ rvm info
ruby-2.3.1:
system:
uname: "Darwin MacBook-Pro-di-Franco.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Sep 1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64 x86_64"
system: "osx/10.11/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)"
zsh: "/bin/zsh => zsh 5.0.8 (x86_64-apple-darwin15.0)"
rvm:
version: "rvm 1.27.0 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "19 days 13 hours 8 minutes 17 seconds ago"
path: "/Users/ronda/.rvm"
ruby:
interpreter: "ruby"
version: "2.3.1p112"
date: "2016-04-26"
platform: "x86_64-darwin15"
patchlevel: "2016-04-26 revision 54768"
full_version: "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]"
homes:
gem: "/Users/ronda/.rvm/gems/ruby-2.3.1"
ruby: "/Users/ronda/.rvm/rubies/ruby-2.3.1"
binaries:
ruby: "/Users/ronda/.rvm/rubies/ruby-2.3.1/bin/ruby"
irb: "/Users/ronda/.rvm/rubies/ruby-2.3.1/bin/irb"
gem: "/Users/ronda/.rvm/rubies/ruby-2.3.1/bin/gem"
rake: "/Users/ronda/.rvm/rubies/ruby-2.3.1/bin/rake"
environment:
PATH: "/Users/ronda/.rvm/gems/ruby-2.3.1/bin:/Users/ronda/.rvm/gems/ruby-2.3.1@global/bin:/Users/ronda/.rvm/rubies/ruby-2.3.1/bin:/Users/ronda/.sdkman/candidates/groovy/current/bin:/Users/ronda/.sdkman/candidates/gradle/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/ronda/.rvm/bin:/Users/ronda/Development/adt-bundle-mac-x86_64-20140321/sdk/tools:/Users/ronda/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:/Users/ronda/projects/depot_tools:/Users/ronda/projects/aws/ec2-api-tools-1.7.1.0/bin"
GEM_HOME: "/Users/ronda/.rvm/gems/ruby-2.3.1"
GEM_PATH: "/Users/ronda/.rvm/gems/ruby-2.3.1:/Users/ronda/.rvm/gems/ruby-2.3.1@global"
MY_RUBY_HOME: "/Users/ronda/.rvm/rubies/ruby-2.3.1"
IRBRC: "/Users/ronda/.rvm/rubies/ruby-2.3.1/.irbrc"
RUBYOPT: ""
gemset: ""
$ rvm use jruby-9.1.5.0
Using /Users/ronda/.rvm/gems/jruby-9.1.5.0
$ irb
jruby-9.1.5.0 :001 > require 'rio'
/Users/ronda/.rvm/gems/jruby-9.1.5.0/gems/rio-0.5.1/lib/rio/alturi/escape.rb:62: warning: `+' after local variable or literal is interpreted as binary operator
/Users/ronda/.rvm/gems/jruby-9.1.5.0/gems/rio-0.5.1/lib/rio/alturi/escape.rb:62: warning: even though it seems like unary operator
=> true
jruby-9.1.5.0 :002 > rio('jnice.jpg').binmode < rio('http://farm4.static.flickr.com/3134/3160515898_59354c9733.jpg?v=0')
=> #<Rio:0x7d4:"jnice.jpg" (Stream::Reset)>
jruby-9.1.5.0 :003 > rio('jnice2.jpg') < rio('http://farm4.static.flickr.com/3134/3160515898_59354c9733.jpg?v=0')
=> #<Rio:0x7d6:"jnice2.jpg" (Stream::Reset)>
jruby-9.1.5.0 :004 > exit
$ ls -lrt jnice*
-rw-r--r-- 1 ronda staff 199369 19 Nov 07:53 jnice.jpg
-rw-r--r-- 1 ronda staff 199369 19 Nov 07:54 jnice2.jpg
$ rvm info
jruby-9.1.5.0:
system:
uname: "Darwin MacBook-Pro-di-Franco.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Sep 1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64 x86_64"
system: "osx/10.11/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)"
zsh: "/bin/zsh => zsh 5.0.8 (x86_64-apple-darwin15.0)"
rvm:
version: "rvm 1.27.0 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "19 days 13 hours 12 minutes 29 seconds ago"
path: "/Users/ronda/.rvm"
ruby:
interpreter: "jruby"
version: "9.1.5.0"
date: "jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.5-b02 on 1.8.0_05-b13 +jit [darwin-x86_64]"
platform: "darwin-x86_64"
patchlevel: "TM"
full_version: "jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.5-b02 on 1.8.0_05-b13 +jit [darwin-x86_64]"
homes:
gem: "/Users/ronda/.rvm/gems/jruby-9.1.5.0"
ruby: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0"
binaries:
ruby: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0/bin/ruby"
irb: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0/bin/irb"
gem: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0/bin/gem"
rake: "/Users/ronda/.rvm/gems/jruby-9.1.5.0@global/bin/rake"
environment:
PATH: "/Users/ronda/.rvm/gems/jruby-9.1.5.0/bin:/Users/ronda/.rvm/gems/jruby-9.1.5.0@global/bin:/Users/ronda/.rvm/rubies/jruby-9.1.5.0/bin:/Users/ronda/.rvm/bin:/Users/ronda/.sdkman/candidates/groovy/current/bin:/Users/ronda/.sdkman/candidates/gradle/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/ronda/Development/adt-bundle-mac-x86_64-20140321/sdk/tools:/Users/ronda/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:/Users/ronda/projects/depot_tools:/Users/ronda/projects/aws/ec2-api-tools-1.7.1.0/bin"
GEM_HOME: "/Users/ronda/.rvm/gems/jruby-9.1.5.0"
GEM_PATH: "/Users/ronda/.rvm/gems/jruby-9.1.5.0:/Users/ronda/.rvm/gems/jruby-9.1.5.0@global"
MY_RUBY_HOME: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0"
IRBRC: "/Users/ronda/.rvm/rubies/jruby-9.1.5.0/.irbrc"
RUBYOPT: ""
gemset: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.