真的很短的故事: 我对这个问题感到非常沮丧
短篇小说: 使用Warbler(1.3.8)部署到glassfish v3服务器的JRuby-1.7.2构建到.war。我可以在我的机器上构建,一切正常,但是当我尝试使用Jenkins构建时,战争在尝试加载第一页时出现以下错误:
org.jruby.exceptions.RaiseException:(NameError)uninitialized constant 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 ---系统 jruby 1.7.4(1.9.3p392)2013-05-16 2390d3b on OpenJDK 64-Bit Server 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: /选择/ glassfish3 / GlassFish中/域/ myDomain的/应用/网络管理/ WEB-INF /宝石 激活的宝石: 捆绑-1.3.5 耙10.0.4 国际化-0.6.1 multi_json-1.7.4 的ActiveSupport-3.2.13 建设者-3.0.4 activemodel的-3.2.13 erubis-2.7.0 旅程-1.0.4 机架1.4.5 机架缓存1.2 机架测试0.6.2 加息-1.2.2 倾斜1.4.1 链轮-2.2.2 ActionPack的-3.2.13 MIME类型 - 1.23 通晓多国语言,0.3.3 树梢-1.4.12 邮件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-红宝石3.0.1的Java 上海社会科学院-3.2.9 自举萨斯-2.3.1.2 will_paginate-3.0.4 引导-will_paginate-0.0.9 充气-城堡Java的1.5.0147 咖啡脚本源1.6.2 execjs-1.4.0 咖啡脚本2.2.0 机架-SSL-1.3.3 JSON-1.8.0-java的 RDoc的-3.12.2 雷神-0.18.1 railties-3.2.13 咖啡轨-3.2.2 骗子-1.1.2 httpi-2.0.2 jQuery的轨道-2.2.2 JRuby的OpenSSL的-0.8.8 紫菜-2.1.0 轨-3.2.13 上海社会科学院护栏-3.2.6 芥末3.1.0 萨翁-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 没有=开发:测试:资产 bin_path = /opt/glassfish3/glassfish/domains/myDomain/applications/web-admin/WEB-INF/gems/gems/bundler-1.3.5/bin/bundle
--- JRuby-Rack Config 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.LoggingOutputStream$LoggingPrintStream@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:重置机架响应到期异常|#]
答案 0 :(得分:0)
原来这是源代码控制的问题。我的帮助程序目录未添加,因此Jenkins未包含在构建中。总是首先检查明显的,如果它说不存在它可能不是。