No implicit conversion of nil into String <TypeError>
jsh562 opened this issue · 4 comments
I'm hitting this also on my heroku instance that was working previous using ruby 2.7.0. Specifically this is a sinatra app.
2020-02-09T02:19:41.061545+00:00 heroku[web.1]: Process exited with status 1
2020-02-09T02:22:53.755337+00:00 heroku[web.1]: State changed from crashed to starting
2020-02-09T02:22:57.656672+00:00 heroku[web.1]: Starting process with command `bundle exec rackup -p 20454`
2020-02-09T02:23:02.390084+00:00 heroku[web.1]: State changed from starting to crashed
2020-02-09T02:23:02.371600+00:00 heroku[web.1]: Process exited with status 1
2020-02-09T02:23:02.266656+00:00 app[web.1]: bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.5.0/bin/rackup)
2020-02-09T02:23:02.266717+00:00 app[web.1]: TypeError: no implicit conversion of nil into String
2020-02-09T02:23:02.266718+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:25:in `join'
2020-02-09T02:23:02.266723+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:25:in `block in guess'
2020-02-09T02:23:02.266723+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:24:in `each'
2020-02-09T02:23:02.266724+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/rack/adapter/loader.rb:24:in `guess'
2020-02-09T02:23:02.266724+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:168:in `load_adapter'
2020-02-09T02:23:02.266724+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/thin-1.7.2/lib/thin/controllers/controller.rb:74:in `start'
2020-02-09T02:23:02.266724+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/rack-2.2.0/lib/rack/handler/thin.rb:27:in `run'
2020-02-09T02:23:02.266724+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/rack-2.2.0/lib/rack/server.rb:327:in `start'
2020-02-09T02:23:02.266725+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/rack-2.2.0/lib/rack/server.rb:168:in `start'
2020-02-09T02:23:02.266725+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/rack-2.2.0/bin/rackup:5:in `<top (required)>'
2020-02-09T02:23:02.266725+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/rackup:23:in `load'
2020-02-09T02:23:02.266730+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/rackup:23:in `<top (required)>'
It looks like the dir is nil when it tries to do a guess from my local prying into the gem. I'm trying to find a solution.
With rails 6.0.2.1 and thin 1.7.2 , the latest version of rack I can use is 2.1.2 without getting said error.
This sounds like this is a rack issue and not a thin issue in that case. I changed my sinatra setup to use puma instead of thin and it fixed my problem, but that's not truly a solution.
Edit:
Looks like rack/rack#1583 was fixed last night so likely the latest rack should fix this problem. There's also an issue open on rack about the future of thin support with rack.
Can you confirm if this is fixed?