-
Notifications
You must be signed in to change notification settings - Fork 136
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
org.jruby.rack.RackInitializationException: can't convert nil into String #197
Comments
please try using jruby 1.7.22 if it still happens, thanks |
Just tried it with jruby 1.7.22, the same exception is thrown with jruby-rack 1.1.16 and 1.1.18 |
thanks, in that case it seems that config.before_configuration do |app|
puts "JRuby::Rack.context = #{JRuby::Rack.context.inspect}"
puts "JRuby::Rack.app_path = #{JRuby::Rack.app_path.inspect}"
puts "JRuby::Rack.context.getRealPath('/') = #{JRuby::Rack.context.getRealPath('/').inspect}"
puts "JRuby::Rack.public_path = #{JRuby::Rack.public_path.inspect}"
# ... the real code :
paths, public = app.config.paths, Pathname.new(JRuby::Rack.public_path)
if paths.respond_to?(:'[]') && paths.respond_to?(:keys)
# ...
end and report back with your TC version as well (and whether you tried a server upgrade), thanks. |
Trinidad uses Tomcat 7.0.37 under the hood. Updating it to 7.0.57 changes nothing. Also updating Trinidad to 1.4.6 doesn't help. If I patch
Interestingly, if I use Trinidads option to specify the
but the application starts (without any css or images of course) |
thanks, but now I'm confused - you did not get Trinidad to fail while printing the above output, right? without reproducing I do not see clearly what the cause is, there has been changes in the layout, these .rb parts might be affecting your case ... for now the main suspect although there's other related changes. |
Sorry, I added the outputs to Rails' before_configuration, not JRuby::Rack. Now I spammed the jar file with puts statements and finally got to the reason: FileSystemLayout detects "public" as default public dir, but also finds, that that directory is not present. 😔 I tend to say, that jruby-rack doesn't has to take care about this case, but maybe you can add a more convenient error message. |
I see thanks - that is about what I ~ thought could explain this ... less weird if it was "only" OSX-specific. sure can probably warn on missing dir esp. with Rails ... with a simple app a missing |
Yes, if I just run "rails server", webrick comes up and the application works fine. |
* 1.1-stable: (46 commits) one line is enough ... `lines -= 5` update for next dev SNAPSHOT prepare for 1.1.20 setup testing against rails 5.0 beta1 (using rack 2.0.alpha) re-invent missing Rack::Utils.bytesize (2.0 will work) + prefix ::Rack constant! [travis-ci] let those jossl issues fail until there's time to figure out (can not reproduce) [travis-ci] 1.7.16 has loading issues with jossl thus try 1.7.4 instead use recent jruby-openssl that works better with all jrubies fill in release notes for 1.1.20 pre-maturely avoid Ruby frozen string literals coming at us ... ''.dup meh! fix broken controller.servlet_response spec from jruby#201 allow to boot when RAILS_ROOT/public directory does not exist (closes jruby#197) for better booter detection - export public path after working directory was changed improvise more rails boot isolation in "stub" spec - now that more of it runs adjust stubbing setup - do not unshift LOAD_PATH in spec_helper stub-ed specs have not been running - change that and re-invent rails stub .rb files Add a `ActionController::Base` method to return the `servlet_response` adjust jruby home dir fallback (for default $LOAD_PATH) correctly on 9K and --2.0 (c) 2016! bundle update jruby-openssl ...
I use JRuby 1.7.18 with Rails 3.2.22 and Trinidad 1.4.4 on Mac OS X.
My application runs just fine with jruby-rack 1.1.10 - 1.1.14. But starting with 1.1.16 I get the following exception. My colleague on Linux has no problems with 1.1.18 and the same setup.
Were there any configuration changes introduced?
The text was updated successfully, but these errors were encountered: