-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundler::GemNotFound: Could not find ... in locally installed gems #539
Comments
Hello, I had another go at this. I am experimenting with the following Rails project:
I am able to produce a working executable war with the following JRuby version :
If I upgrade my project to Ruby 3.1 and switch to JRuby 9.4 then i am getting this message when i run java -jar my.war: Could not find (List of Gems here) in locally installed gems Note that the project runs perfectly fine when I run it via jruby -S rails server I couldn't find any JRuby version that supports Rails 2.7, but that's more of a JRuby issue. I am happy to help if anyone more competent wants to look into this. Thank you. |
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
* Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
Fix various issues when building the war. * Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
Fix various issues when building the war. * Stick to Rails 6.1 for now, due to warbler compatibility issues with JRuby 9.4 (jruby/warbler#539) * Don't use git:// protocol in Gemfile, it won't work in the war * Upgrade MariaDB driver * Remove unecessary files from war * Fix dummy_production.key permission at runtime * Set a default secret key value * ci: add Tomcat tests Signed-off-by: Pierre-Alexandre Meyer <[email protected]>
Im getting the same error updating to jruby 9.4.3.0, and pulling from master |
Just ran into the issue, for information, running rake tasks in an executable WAR using Rails 7 and jRuby 9.4.3.0 works but as soon as you want to boot the application in a Servlet like Tomcat the issue pops up. |
We have this in our rails app in file config/warble.rb and it seems to work with warbler from master branch and with jruby 9.4.3.0 If I remember correctly this is related to #430
|
Still get this issue. |
Hello,
I am using Warbler 2.0.5 with JRuby 9.4.2.0. When I generate a WAR, it will work fine on the system I generated it.
If I use that war on a different system, I will get an error that my gems are missing however they seem to be there in the WAR archive.
02-Apr-2023 11:21:13.585 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
02-Apr-2023 11:21:13.585 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
02-Apr-2023 11:21:13.585 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@186f8716')
02-Apr-2023 11:29:28.491 INFO [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationContext.log INFO: jruby 9.4.2.0 (3.1.0) 2023-03-08 90d2913fda Java HotSpot(TM) 64-Bit Server VM 25.361-b09 on 1.8.0_361-b09 +jit [x86_64-mswin32]
02-Apr-2023 11:29:28.493 INFO [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationContext.log INFO: using a shared (threadsafe!) runtime
02-Apr-2023 11:29:37.165 INFO [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationContext.log An exception happened during JRuby-Rack startup
Could not find rack-2.2.6.4, sinatra-3.0.5, mustermann-3.0.0, rack-protection-3.0.5, tilt-2.0.11 in locally installed gems
--- System
jruby 9.4.2.0 (3.1.0) 2023-03-08 90d2913fda Java HotSpot(TM) 64-Bit Server VM 25.361-b09 on 1.8.0_361-b09 +jit [x86_64-mswin32]
Time: 2023-04-02 11:29:37 -0700
Server: Apache Tomcat/9.0.73
jruby.home: uri:classloader://META-INF/jruby.home
--- Context Init Parameters:
public.root = /
rack.env = production
--- Backtrace
at C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\config.ru:2Bundler::GemNotFound: Could not find rack-2.2.6.4, sinatra-3.0.5, mustermann-3.0.0, rack-protection-3.0.5, tilt-2.0.11 in locally installed gems
materialize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:507
specs at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:187
specs_for at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:244
setup at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/runtime.rb:18
setup at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:161
require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:186
instance_eval at org/jruby/RubyBasicObject.java:2506
instance_eval at org/jruby/RubyBasicObject.java:2534
initialize at uri:classloader:/vendor/rack-1.6.13/rack/builder.rb:55
new at org/jruby/RubyClass.java:931
at C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\config.ru:1
--- RubyGems
Gem.dir: uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
Gem.path:
C:\Windows\ServiceProfiles\LocalService/.local/share/gem/jruby/3.1.0
uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
Activated gems:
jar-dependencies-0.4.1
did_you_mean-1.6.1
stringio-3.0.5-java
bundler-2.3.25
fileutils-1.6.0
time-0.1.0
uri-0.11.0
--- Bundler
Bundler.bundle_path: uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
Bundler.root: C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps/stock-service/WEB-INF
Gemfile: C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps/stock-service/WEB-INF/Gemfile
Settings:
gemfile = C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\Gemfile
without = [:development, :test, :assets]
--- JRuby-Rack Config
compat_version =
default_logger = org.jruby.rack.logging.StandardOutLogger@5704ad4a
equals = <error: >
err = org.apache.tomcat.util.log.SystemLogHandler@261ee264
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@30c84ac4
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size =
maximum_runtimes =
num_initializer_threads =
out = org.apache.tomcat.util.log.SystemLogHandler@a36f801
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_environment =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@592043c7
throw_init_exception = false
02-Apr-2023 11:29:37.165 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationContext.log ERROR: initialization failed
'org.jruby.rack.RackInitializationException: Could not find rack-2.2.6.4, sinatra-3.0.5, mustermann-3.0.0, rack-protection-3.0.5, tilt-2.0.11 in locally installed gems
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:507:in
materialize' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:187:in
specs'from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/definition.rb:244:in
specs_for' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler/runtime.rb:18:in
setup'from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:161:in
setup' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/bundler.rb:186:in
require'from C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\config.ru:2:in
block in <main>' from org/jruby/RubyBasicObject.java:2506:in
instance_eval'from org/jruby/RubyBasicObject.java:2534:in
instance_eval' from uri:classloader:/vendor/rack-1.6.13/rack/builder.rb:55:in
initialize'from org/jruby/RubyClass.java:931:in
new' from C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\config.ru:1:in
In Tomcat:
C:\Users\Administrator>dir "C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\gems\gems"
Volume in drive C has no label.
Volume Serial Number is C683-8D31
Directory of C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\stock-service\WEB-INF\gems\gems
04/02/2023 01:24 PM
.04/02/2023 01:24 PM ..
04/02/2023 01:24 PM bundler-2.4.10
04/02/2023 01:24 PM mustermann-3.0.0
04/02/2023 01:24 PM rack-2.2.6.4
04/02/2023 01:24 PM rack-protection-3.0.5
04/02/2023 01:24 PM sinatra-3.0.5
04/02/2023 01:24 PM tilt-2.0.11
0 File(s) 0 bytes
8 Dir(s) 79,136,116,736 bytes free
C:\Users\Administrator>
I am new to Ruby and JRuby, I am sure I am doing something wrong, would appreciate some pointers to the right direction as I really don't know how to troubleshoot this.
Thank you
The text was updated successfully, but these errors were encountered: