Warbler does not package Java/JRuby gems? -


i have ruby on rails app want compile/package war file host in tomcat. i've added of relevant stuff can find, war appears include non-jruby versions of gems. result, gemnotfound exceptions such "could not find activerecord-jdbc-adapter" in tomcat. if open war file in 7-zip, not show of jruby or java gems under /web-inf/gems/gems.

warbler not report errors or warnings, , war appears contain needs, except these gems.

(because lightweight, internal app, i'm using sqlite now... explains sqlite gems. db stored outside project , configured in database.yml file.)

the relevant snippet gemfile:

if defined?(jruby_version)   gem 'jdbc-sqlite3'   gem 'activerecord-jdbc-adapter'   gem 'activerecord-jdbcsqlite3-adapter'   gem 'jruby-openssl'   gem 'jruby-rack' else   gem 'sqlite3' end 

i tried explicitly including/excluding these gems in warble.rb file:

config.gems -= ["sqlite3"]  config.gems += [   "jdbc-sqlite3",   "activerecord-jdbc-adapter",   "activerecord-jdbcsqlite3-adapter",   "jruby-openssl",   "jruby-rack",   "warbler" ] 

as interesting side note, if modify gemfile demand jruby gems, jruby -s bundle install works fine warble gives series of errors stating gems use jruby. on other hand, if try run within jruby (jruby -s warble) get:

warble aborted!

no such file load -- jruby_pageant

how can convince warbler want jruby gems?

edit:

i tried specifying platforms in gemfile, described in blog post, causes warble stack-overflow.

platforms :jruby   gem 'jdbc-sqlite3'   gem 'activerecord-jdbc-adapter', :require => false   gem 'activerecord-jdbcsqlite3-adapter', :require => false   gem 'jruby-openssl'   gem 'jruby-rack' end platforms :ruby   gem 'sqlite3' end 

versions:

  • ruby 1.9.3
  • jruby 1.7.4
  • warbler 1.3.8

so turns out missing jruby-pageant gem. once added bundle, jruby -s warble produced expected output.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -