Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

OSGI/Rails/Equinox/Pax-Web - no such file to load -- /WEB-INF/config/environment.rb

未关闭
#290 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
java, ruby
领域
build-system

调研方向

The failing lookup is /WEB-INF/config/environment.rb, raised from load_environment in classpath:/jruby/rack/rails/environment2.rb and called via rails_booter.rb, so start there to see how the WAR-internal path is resolved. The report also shows Gem.dir and the load path pointing into /WEB-INF/gems/, which is where a Warbler-built archive is inspected. The issue gives no reproduction steps, expected outcome or test to target, and it depends on OSGi Equinox and Pax-Web, so a newcomer would need to reproduce the setup first.

由索引模型根据 Issue 内容生成。

描述

Hi,

I am currently trying to POC the deployment of a Rails app as an OSGI bundle in Equinox using Pax-Web + Jetty to automatically load the WAR file generated with Warble.

I achieved to load the Warble-generated bundle and I am now facing the following error:

--- Context Init Parameters:
public.root = /
rails.env = production
webapp.context = dummy

--- Backtrace
LoadError: no such file to load -- /WEB-INF/config/environment.rb
              load at org/jruby/RubyKernel.java:1081
  load_environment at classpath:/jruby/rack/rails/environment2.rb:25
  load_environment at classpath:/jruby/rack/rails_booter.rb:83
            (root) at <script>:1

--- RubyGems
Gem.dir: /WEB-INF/gems/
Gem.path:
/WEB-INF/gems
/Users/pvosges/.rvm/gems/jruby-1.7.8
/Users/pvosges/.rvm/gems/jruby-1.7.8@global
/WEB-INF/gems/
Activated gems:

--- Bundler
undefined method `bundle_path' for Bundler:Module

--- JRuby-Rack Config
compat_version =
default_logger = org.jruby.rack.logging.StandardOutLogger@5e4f92de
equals = <error: >
err = org.apache.felix.gogo.runtime.threadio.ThreadPrintStream@d222e6e
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@13b9beab
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size =
maximum_runtimes =
num_initializer_threads =
out = org.apache.felix.gogo.runtime.threadio.ThreadPrintStream@7fb22024
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_environment =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = ServletContext@HttpServiceContext{httpContext=WebAppHttpContext{DummyApp - 32}}
throw_init_exception = false

--- $LOAD_PATH:
classpath:/META-INF/jruby.home/lib/ruby/1.9/site_ruby
classpath:/META-INF/jruby.home/lib/ruby/shared
classpath:/META-INF/jruby.home/lib/ruby/1.9

Is it even possible to use a Warble-generated WAR without exploding it?

Note: might be related to https://github.com/jruby/warbler/issues/44.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4293889-osgi-rails-equinox-pax-web-no-such-file-to-load-web-inf-config-environment-rb?utm_campaign=plugin&utm_content=tracker%2F136961&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136961&utm_medium=issues&utm_source=github).
主要语言
Ruby
星标
901
派生
206
平均合并
1 天 10 小时
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

jruby/warbler 的其他 Issue

查看 jruby/warbler 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。