Search code examples
rubyjrubytravis-ci

Jruby does not install runtime dependencies with travis.ci


I am running travis.ci with my https://github.com/JelF/xquery/tree/release/0.2.0
How could i fix it?

In xquery.gemspec i specified spec.add_dependency 'activesupport', '~> 4.0' and it works localy with jruby and at travis with mri, but with jruby-9.0.4.0 bundler does not install activesupport gem

Complete travis log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/96552234/log.txt

update: i retested master which have passed it previously and problem persist
update2: changed add_runtime_dependency to add_dependency, no impact


Solution

  • I have exactly the same problem. All worked fine up until this week. I just restarted the Travis builds (no code changes) and the jruby builds start to fail because some gems are not installed. It happens on jruby 9.0.1.0 in my case.

    And I can repeat it on my own system - unfortunately - after updating rvm to head and installing jruby 9.0.1.0 again. Bundle install/update just won't install the gems listed with add_runtime_dependency or add_dependency.

    The latest version of Builder is to blame. If you want to know more about this, go to the issue on github

    To solve this issue, either do not use 1.11.0 of builder or add the following line to the gemspec:

    spec.platform = Gem::Platform::JAVA if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
    

    At least for me that worked.