我使用Jruby 1.7.11,Rails 4.0和warbler来生成.war,在运行Java的Tomcat上部署,部署在远程系统上。
当我在OSX上使用Tomcat部署.war时,它就像一个魅力。当我尝试在Windows上将相同的.war部署到Tomcat时出现此错误:
No timezone data source could be found. To resolve this,
either install TZInfo::Data (e.g. by running `gem install tzinfo-data`)
or specify a zoneinfo directory using `TZInfo::DataSource.set(:zoneinfo, zoneinfo_path)`.
from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:199:in `create_default_data_source' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:62:in `get' from org/jruby/ext/thread/Mutex.java:149:in `synchronize' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/data_source.rb:61:in `get' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/timezone.rb:601:in `data_source' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/timezone.rb:114:in `get' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/timezone_proxy.rb:84:in `real_timezone' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/timezone_proxy.rb:52:in `period_for_utc' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/tzinfo-1.1.0/lib/tzinfo/timezone.rb:524:in `current_period' from org/jruby/RubyKernel.java:1945:in `public_send' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/core_ext/object/try.rb:45:in `try' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/values/time_zone.rb:223:in `utc_offset' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/values/time_zone.rb:396:in `[]' from org/jruby/RubyKernel.java:1873:in `tap' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/values/time_zone.rb:396:in `[]' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/core_ext/time/zones.rb:60:in `find_zone!' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/activesupport-4.1.0/lib/active_support/railtie.rb:20:in `Railtie' from org/jruby/RubyBasicObject.java:1562:in `instance_exec' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `run_initializers' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:150:in `tsort_each' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:183:in `each_strongly_connected_component' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:219:in `each_strongly_connected_component_from' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:182:in `each_strongly_connected_component' from org/jruby/RubyArray.java:1613:in `each' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:180:in `each_strongly_connected_component' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-stdlib-complete-1.7.12.jar!/META-INF/jruby.home/lib/ruby/1.9/tsort.rb:148:in `tsort_each' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/gems/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!' from C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/config/environment.rb:5:in `(root)' from org/jruby/RubyKernel.java:1065:in `require' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-rack-1.1.14.jar!/jruby/rack/rails/environment3.rb:1:in `(root)' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-rack-1.1.14.jar!/jruby/rack/rails/environment3.rb:25:in `load_environment' from file:/C:/Users/Space Pope/Apache-Tomcat7/webapps/eschoolcore/WEB-INF/lib/jruby-rack-1.1.14.jar!/jruby/rack/rails_booter.rb:76:in `load_environment'
我已确保使用jruby安装tzinfo-data并在我的gemfile中安装:gem' tzinfo-data',平台:[:x64_mingw,:mingw,:mswin]
宝石' tzinfo'
我还尝试过没有gemfile中的平台修饰符,但无论如何都有同样的问题。
我在谷歌上发现的一切都表明我需要安装tzinfo,tzinfo-data并将它们放在我的gem文件中,但这样做似乎没有帮助。