开发者

Error while trying to use warble on ChiliProject for JRuby/Jetty deployment

开发者 https://www.devze.com 2023-04-03 16:09 出处:网络
I\'m trying to use warbler on ChiliProject (a Redmine fork, Rails 2.3 app) to deploy it in a Java Jetty web server. But when I run warble at the projects root folder, it fails with the given error mes

I'm trying to use warbler on ChiliProject (a Redmine fork, Rails 2.3 app) to deploy it in a Java Jetty web server. But when I run warble at the projects root folder, it fails with the given error message:

$ warble  --trace
warble aborted!
undefined method `gems' for #<Rails::VendorGemSourceIndex:0x2e9267fe>
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:260:in `all_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:172:in `installed_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:162:in `fetch_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/index.rb:7:in `build'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:161:in `fetch_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:70:in `specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:159:in `index'
org/jruby/RubyArray.java:1603:in `each'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:158:in `index'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/index.rb:7:in `build'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:157:in `index'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundle开发者_高级运维r/definition.rb:151:in `resolve'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:90:in `specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:135:in `specs_for'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:124:in `requested_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:102:in `bundler_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:38:in `add_bundler_gems'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:29:in `after_configure'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits.rb:32:in `after_configure'
org/jruby/RubyArray.java:1603:in `each'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits.rb:32:in `after_configure'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/config.rb:172:in `initialize'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/task.rb:48:in `initialize'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/application.rb:27:in `load_rakefile'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:61:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/application.rb:70:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/bin/warble:11:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
/Users/razenha/.rvm/gems/jruby-1.6.3/bin/warble:19:in `(root)'

I'm using JRuby 1.6.3, JDK 1.6, warbler 1.3.2 and ChiliProject 2.2.0.


At first, I sadly have to disappoint you, as we don't fully support JRuby yet. On the other hand, there are probably "only" encoding issues left to fix so if you are careful, things should work out just okay.

That said, it looks like Rails 2.3 doesn't play too well with Bundler here. If you drop the following file into lib/redmine/core_ext/vendor_gem_source_index.rb of your ChiliProject dirctory, you should be able to run warbler.

class Rails::VendorGemSourceIndex
  def gems
    @installed_source_index.gems.merge @vendor_source_index.gems
  end
end

You still need to configure warbler to use the correct bundler groups. As warbler does it's own thing here (and as I haven't yet used warbler with bundled apps) you might need top find out how to configure this. Have a look into the Gemfile and our Bundler page for more information.

And if you are nagging enough, we might one day officially support this :) Also, more friendly people can be found in our own Forums and on IRC.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号