5

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?

ekremkaraca
  • 1,453
  • 2
  • 18
  • 37
  • 1
    I found the answer. set GEM_HOME (if in windows to not try to export it from cygwin when testing it, jruby gets all messed up with cygwin paths) you can priobibly also use GEM_PATH but i like my way better ;). – defenistrator Jan 05 '12 at 16:13
  • 2
    Well done. I suggest you put this as an answer. – Robert Brown Jan 06 '12 at 00:33

1 Answers1

1

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/

deepflame
  • 928
  • 1
  • 8
  • 19