Search code examples
jrubygemspecs

How do I add runtime dependency for java with jruby


I've create a wrapper gem for connecting to a tibco queue & uploaded that gem to my local gemserver. When I try to include the wrapper gem in other projects, I get the following error:

Bundler could not find compatible versions for gem "jruby-jms":
  In Gemfile:
    jruby-jms (>= 1.2.0, ~> 1.2) java

    tibco_client (>= 0) java depends on
      jruby-jms (>= 1.2.0, ~> 1.2) ruby

    jruby-jms (>= 0) java

    jruby-jms (>= 0) ruby
    Could not find gem 'jruby-jms (>= 1.2.0, ~> 1.2) ruby in any of the sources

I am trying to figure out how to list the runtime dependency but I can't find any instruction or examples:

spec.platform      = 'java'
spec.add_runtime_dependency 'jruby-jms', '~> 1.2', '>= 1.2.0'

Does anybody have experience in resolving something like this? I'm using jruby-1.7.19 (also tried 1.7.4, same result).


Solution

  • I found the problem was in my Gemfile. Syntax found on stackoverflow.

    gem 'tibco_client', :source => 'http://gemserver:9292', :platforms => 'jruby'