0

真正的短篇小说:我对这个问题感到非常沮丧


短篇小说:JRuby-1.7.2 使用 Warbler (1.3.8) 构建到 .war,部署到 glassfish v3 服务器。我可以在我的机器上构建并且一切正常,但是当我尝试使用 Jenkins 构建时,在尝试加载第一页时,war 会出现以下错误:

org.jruby.exceptions.RaiseException: (NameError) 未初始化常量 ApplicationController::SessionsHelper


长话短说:在我们的 Jenkins 服务器上构建脚本:

#path to rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Use the correct ruby
rvm use "jruby-1.7.2@webadmin"
# Set "fail on error" in bash
set -e
# build
bundle update
warble compiled war

Glassfish 的错误日志......我希望有足够的信息。

[#|2013-05-31T17:10:14.634-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;| PWC1412:WebModule[null] ServletContext.log():INFO:池为空 - 获取新的应用程序实例|#]

[#|2013-05-31T17:10:25.181-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;| PWC1412:WebModule[null] ServletContext.log():JRuby-Rack 启动期间发生异常未初始化常量 ApplicationController::SessionsHelper --- System jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit服务器 VM 1.6.0_27-b27 [linux-amd64] 时间:2013-05-31 17:10:25 -0400 服务器:GlassFish Server 开源版 3.1.2.2 jruby.home:classpath:/META-INF/jruby.home

--- 上下文初始化参数:com.sun.faces.forceLoadConfiguration = true com.sun.faces.validateXml = true public.root = / rails.env = production

--- Backtrace NameError: 未初始化的常量 ApplicationController::SessionsHelper

--- RubyGems Gem.dir:/opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems Gem.path:/opt/glassfish3/glassfish/domains/myDomain/applications/web-admin /WEB-INF/gems 激活的 gems:bundler-1.3.5 rake-10.0.4 i18n-0.6.1 multi_json-1.7.4 activesupport-3.2.13 builder-3.0.4 activemodel-3.2.13 erubis-2.7.0 Journey -1.0.4 机架-1.4.5 机架缓存-1.2 机架测试-0.6.2 远足-1.2.2 倾斜-1.4.1 链轮-2.2.2 动作包-3.2.13 哑剧类型-1.23 多语言-0.3。 3 treetop-1.4.12 mail-2.5.4 actionmailer-3.2.13 arel-3.0.2 tzinfo-0.3.37 activerecord-3.2.13 activeresource-3.2.13 gyoku-1.0.0 nokogiri-1.5.9-java akami- 1.2.0 bcrypt-ruby-3.0.1-java sass-3.2.9 bootstrap-sass-2.3.1.2 will_paginate-3.0.4 bootstrap-will_paginate-0.0.9 bouncy-castle-java-1.5.0147 coffee-script-source -1.6。2 execjs-1.4.0 coffee-script-2.2.0 rack-ssl-1.3.3 json-1.8.0-java rdoc-3.12.2 thor-0.18.1 railties-3.2.13 coffee-rails-3.2.2 faker -1.1.2 httpi-2.0.2 jquery-rails-2.2.2 jruby-openssl-0.8.8 nori-2.1.0 rails-3.2.13 sass-rails-3.2.6 wasabi-3.1.0 savon-2.2.0 therubyrhino_jar-1.7.4 therubyrhino-2.0.2 uglifier-1.0.4 uuidtools-2.1.4

--- Bundler Bundler.bundle_path:/opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems Bundler.root:/opt/glassfish3/glassfish/domains/myDomain/applications/web-admin /WEB-INF Gemfile:/opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/Gemfile 设置:gemfile = /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB -INF/Gemfile 不带 = development:test:assets bin_path = /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems/gems/bundler-1.3.5/bin/bundle

--- JRuby-Rack 配置 compat_version = default_logger = org.jruby.rack.logging.StandardOutLogger@62a49a04 等于 = err = com.sun.common.util.logging.LoggingOutputStream$LoggingPrintStream@7a21bdb8 filter_adds_html = true filter_verifies_resource = false ignore_environment = false initial_memory_buffer_size = initial_runtimes = jms_connection_factory = jms_jndi_properties = logger = org.jruby.rack.logging.ServletContextLogger@19a2312c logger_class_name = servlet_context logger_name = jruby.rack maximum_memory_buffer_size = maximum_runtimes = num_initializer_threads = out = com.sun.common.util.Logging.Log @ 52f8d395 rackup = rackup_path = rewindable = true runtime_arguments = runtime_environment = runtime_timeout_seconds = serial_initialization = false servlet_context = org.apache.catalina.core。ApplicationContextFacade@16c7e149 throw_init_exception = false |#]

[#|2013-05-31T17:10:25.182-0400|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=19;_ThreadName=Thread-2;| PWC1412: WebModule[null] ServletContext.log():DEBUG: 由于异常重置机架响应|#]

4

1 回答 1

0

原来这是源代码控制的问题。我的 helpers 目录没有添加,因此 Jenkins 没有包含在构建中。总是先检查明显的,如果它说它不存在,它可能不存在。

于 2013-06-03T02:33:01.413 回答