我正在关注位于here的指南,以便将Redmine安装到Tomcat,但我遇到了运行Warbler的问题。当我尝试运行时
ruby /var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble config
我收到此错误
/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
我四处搜索,发现这是因为不需要rubygems。当我尝试修复此问题并运行
时ruby -rubygems /var/lib/gems/1.8/gems/warbler-1.2.1/bin/warble config
我现在遇到了这个错误
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'
当我用--trace运行最后一个命令时,我得到了这个
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
文件/var/lib/gems/1.8/gems/jruby-rack-1.0.5/lib/jruby-rack-1.0.5.jar
存在,所以我不确定它为什么遇到问题。
以下是gem list
的输出,以防它有用。
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)
答案 0 :(得分:0)
临时解决方案是使用旧版本的jruby-rack:
gem uninstall jruby-rack
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
输入Y
gem install jruby-rack -v 1.0.3
答案 1 :(得分:0)
或者只是使用
gem install jruby-rack --pre
并在Gemfile中设置
gem 'jruby-rack', '~> 1.0.6.beta'