从jruby-complete中消耗宝石 [英] consuming gems from jruby-complete
问题描述
我可以让我的 jruby-complete
从传递给它的jar中消耗宝石。但我想用中央宝石回购。
这是我现在可以做的:
$ java - jar jruby-complete-1.6.5.jar -S宝石名单
***本地GEMS ***
耙(0.8.7)
来源( 0.0.1)
$ java -jar jruby-complete-1.6.5.jar -rjar_of_gems.jar -S宝石列表
***本地GEMS ***
$ b erubis(2.7.0)
mizuno(0.4.1)
机架(1.4.0)
机架保护(1.2.0)
rake(0.8.7)
rna(0.0.101)
sinatra(1.3.2)
来源(0.0.1)
倾斜(1.3.3)
每次更新宝石或需要添加宝石时,必须更改jar文件,想做。
任何建议,必须有一种方法来获得 jruby-complete
指向像普通jruby这样的宝石回购?
选项1
set GEM_HOME
如果在Windows中不尝试从cygwin中导出它时,jruby会把所有的东西与cygwin路径混淆在一起
答案是上面评论的副本)
选项2
如果您使用Maven,您也可以尝试Maven-Gem-Proxy:
http://rubygems-proxy.torquebox.org/
I can make my jruby-complete
consume gems from a jar passed to it. But I'd like to use a central gem repo.
This is what I can do now:
$ java -jar jruby-complete-1.6.5.jar -S gem list
*** LOCAL GEMS ***
rake (0.8.7)
sources (0.0.1)
$ java -jar jruby-complete-1.6.5.jar -rjar_of_gems.jar -S gem list
*** LOCAL GEMS ***
erubis (2.7.0)
mizuno (0.4.1)
rack (1.4.0)
rack-protection (1.2.0)
rake (0.8.7)
rna (0.0.101)
sinatra (1.3.2)
sources (0.0.1)
tilt (1.3.3)
Having to change the jar file everytime I update a gem or need to add a gem is more overhead than I want to do.
Any suggestions, there must be a way to get jruby-complete
to point to a gem repo like regular jruby?
Option 1
set GEM_HOME
if in windows do not try to export it from cygwin when testing it, jruby gets all messed up with cygwin paths
(this answer is a copy of a comment above)
Option 2
If you use Maven you can also try the Maven-Gem-Proxy: http://rubygems-proxy.torquebox.org/
这篇关于从jruby-complete中消耗宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!