Skip to content

Instantly share code, notes, and snippets.

Created February 12, 2016 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/36c4ca89d097e659f063 to your computer and use it in GitHub Desktop.
Save anonymous/36c4ca89d097e659f063 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/ruby
#
# This file was generated by RubyGems.
#
# The application 'mkrb' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
puts 1
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
puts 2
gem 'mkrb', version
puts 3
puts Gem.bin_path('mkrb', 'mkrb', version)
load Gem.bin_path('mkrb', 'mkrb', version)
puts 4
server:root-/usr/local/bin> mkrb
1
2
3
/usr/local/lib/ruby/gems/2.2.0/gems/mkrb-0.1.0/bin/mkrb
/usr/local/lib/ruby/gems/2.2.0/gems/mkrb-0.1.0/bin/mkrb:3:in `<top (required)>': undefined method `echo' for main:Object (NoMethodError)
from /usr/local/bin/mkrb:26:in `load'
from /usr/local/bin/mkrb:26:in `<main>'
server:root-/usr/local/bin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment