Search code examples
tomcatredminewarbler

Warbler - no such file to load error


I am following the guide located here to install Redmine to Tomcat, but I am running into problems running Warbler. When I try running

ruby /var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble config

I get this error

/var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble:10:in `require': no such file to load -- warbler (LoadError) 
from /var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble:10

I searched around and found that this is caused by not requiring rubygems. When I try to fix this and run

ruby -rubygems /var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble config

I now run into this error

warble aborted!
no such file to load -- /var/lib/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

When I run the last command with --trace I get this

warble aborted!
no such file to load -- /var/lib/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack.rb:6
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/config.rb:254:in `default_jar_files'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/config.rb:140:in `initialize'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/task.rb:47:in `new'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/task.rb:47:in `initialize'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/application.rb:25:in `new'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/application.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/var/lib/gems/1.8/gems/warbler-1.2.1/lib/warbler/application.rb:68:in `run'
/var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble:11

The file /var/lib/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar exists, so I'm not sure why it is running into problems.

Here is the output of gem list, just in case it is useful.

abstract (1.0.0)
actionmailer (3.0.3, 2.3.5)
actionpack (3.0.3, 2.3.5)
activemodel (3.0.3)
activerecord (3.0.3, 2.3.5)
activerecord-jdbc-adapter (1.1.1)
activerecord-jdbcmysql-adapter (1.1.1)
activeresource (3.0.3, 2.3.5)
activesupport (3.0.3, 2.3.5)
arel (2.0.7)
bouncy-castle-java (1.5.0145.2)
builder (3.0.0, 2.1.2)
bundler (1.0.7)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.5)
daemons (1.1.0)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
gdata (1.1.1)
gem_plugin (0.2.3)
gruff (0.3.6)
i18n (0.5.0, 0.4.2)
jdbc-mysql (5.1.13)
jruby-jars (1.5.6)
jruby-openssl (0.7.2)
jruby-rack (1.0.5)
mail (2.2.14)
mime-types (1.16)
mongrel (1.1.5)
mysql (2.8.1)
passenger (3.0.2)
polyglot (0.3.1)
rack (1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.3, 2.3.5)
railties (3.0.3)
rake (0.8.7)
rmagick (2.13.1)
rubyzip (0.9.4)
spruz (0.2.2)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
warbler (1.2.1)

Solution

  • A temporary solution is to use an older version of jruby-rack:

    gem uninstall jruby-rack

    If you remove this gems, one or more dependencies will not be met. Continue with Uninstall? [Yn]

    Type Y

    gem install jruby-rack -v 1.0.3