有沒有人看到這個:??沒有jgem
命令可以工作嗎?雖然jruby -S gem list
確實工作。我使用JRuby 1.3.1和太陽的Java6 JREjruby rubygems更新休息jgem
[email protected]:/usr/local: jgem --version
1.3.3
[email protected]:/usr/local: jgem update --system
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.3.6
/usr/local/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:103:Warning: Gem::SourceIndex#search support for String patterns is deprecated
Updating RubyGems to 1.3.6
Installing RubyGems 1.3.6
RubyGems 1.3.6 installed
[email protected]:/usr/local: jgem list
/usr/local/jruby/bin/jgem: line 8: require: command not found
/usr/local/jruby/bin/jgem: line 9: require: command not found
/usr/local/jruby/bin/jgem: line 10: require: command not found
/usr/local/jruby/bin/jgem: line 12: required_version: command not found
/usr/local/jruby/bin/jgem: line 14: unless: command not found
/usr/local/jruby/bin/jgem: line 15: abort: command not found
/usr/local/jruby/bin/jgem: line 16: end: command not found
/usr/local/jruby/bin/jgem: line 18: args: command not found
/usr/local/jruby/bin/jgem: line 20: begin: command not found
/usr/local/jruby/bin/jgem: line 21: Gem::GemRunner.new.run: command not found
/usr/local/jruby/bin/jgem: line 22: rescue: command not found
/usr/local/jruby/bin/jgem: line 23: exit: e.exit_code: numeric argument required
布拉德@測試:〜$ jruby的-v 的jruby 1.3.1(紅寶石1.8.6p287)(2009-06-15 2fd6c3d)(爪哇的HotSpot(TM)客戶機VM 1.6.0_07)[I386-java的] brad @ test:〜$ jirb irb(main):001:0> exit Both work。另外,jruby的確可以工作,因爲jruby -S語法工作正常,只是不是jgem – brad 2010-02-25 14:40:29
呃,好吧,我不能格式化這顯然,但它表明,這兩個命令的工作。這是在Linux上的btw。我很猶豫要在OSX上做更新,因爲我喜歡使用jgem,而且我有1.3.5這是我真正需要檢查這些文件的 – brad 2010-02-25 14:41:49
,我注意到設置解釋器的最上面一行是不同的。 1.3.6有#!/ usr/local/jruby/bin/jruby和1.3.5有#!/ usr/bin/env jruby我想知道爲什麼區別?顯然1.3.6的版本不能正確加載紅寶石。我對shell腳本不太瞭解,不知道發生了什麼。使用1.3.5的#!/ usr/bin/env jruby替換1.3.6的解釋器行。 – brad 2010-02-25 14:49:38