[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dennou-ruby:003883] Gemで入れたGPhysのgpコマンドでヘルプが出ない
- To: Shin-ichi Takehiro <takepiro@xxxxxxxxxxxxxx>
- Subject: [dennou-ruby:003883] Gemで入れたGPhysのgpコマンドでヘルプが出ない
- From: Hiroki Kashimura <hiroki@xxxxxxxxxxxxxx>
- Date: Fri, 20 Mar 2015 12:46:42 +0900
- Cc: Hiroki Kashimura <hiroki@xxxxxxxxxxxxxx>, dennou-ruby@xxxxxxxxxxx
������
����Ǥ���
gem ����줿 gphys ��p���ޥ��������gpview --help �ʤɤ����Ƥ⡢�إ���ɽ����������
gem������ȡ�bin�ʲ��Τ��Ȥ���pview�ϰʲ��Τ褦�ʤ���֤������褦�Ǥ���
����������������������������
#!/opt/local/bin/ruby2.2
#
# This file was generated by RubyGems.
#
# The application 'gphys' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
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
gem 'gphys', version
load Gem.bin_path('gphys', 'gpview', version)
������������������������������
�Ǹ�ʸ��gpview�����������Ǥ���
�ʤΤǡ�gpcommon.rb ��def help �Ƭ
file = File.open($0)
�ǤϾ嵭��֤��������ե����������ޤäƤ����������ʤ����Ȼפ��ޤ���
file = File.open($0) ������Τ褦�ˤ��뤳�Ȥǡ�gem����줿���ˤ����Ǥ��ޤ�����
begin
file = File.open(Gem.bin_path("gphys",File.basename($0), NumRu::GPhys::VERSION))
rescue
file = File.open($0)
end
Gem.bin_path��裳������Ǥ⤤�����⤷������rescue�Ǥ��ä����äƤ���������ʤ����⤷������Ŭ��˽�����Ƥ���������鹬���Ǥ���
����ʻ�����
hiroki@xxxxxxxxxxxxxx