Bug #1138
[labs] uWSGI shouldn't use system rack
100%
Description
So, right now uWSGI uses the system package ruby-rack
to load config.ru
, which then initializes bundler, informs it that it can load things from vendor/bundle
.
What should happen is that uWSGI loads the system package ruby-bundler
, which informs it about vendor/bundle
, then uWSGI loads rack from vendor/bundle
, to load config.ru
.
That is, right now, it uses the system package ruby-rack
to bootstrap the whole thing, but it should be using the system package ruby-bundler
to bootstrap the whole thing.
Why does it matter? Because the version of Redmine that labs is running requires Rack ~>1.6, but ruby-rack
is on 2.0.1. And, unfortunately, once ruby-rack
rack 2.0 is loaded by uWSGI, bundler will refuse to load vendor/bundle
rack 1.6.
History
Updated by lukeshu over 7 years ago
Since this bug report manages to show up in the first page of Google for relevant searches, I figure I'll document the resolution:
This was in the uWSGI config:
rack = /srv/http/labs.parabola.nu/config.ru
I replaced it with this:
chdir = /srv/http/labs.parabola.nu rbrequire = bundler/setup rack = ./config.ru
The uWSGI docs tell us that rbrequire = rubygems
is necessary for what are ancient versions of Ruby. But because StackOverflow is a steaming cesspool of bullshit, everyone seems to Cargo Cult it and think you still need it. Because God forbid the actual docs show up on search engines before outdated StackOverflow answers.
It is necessary to chdir
and use a relative path for config.ru
so that bundler
knows where to look.
Updated by lukeshu over 7 years ago
- % Done changed from 0 to 100
- Assignee set to lukeshu
- Status changed from open to fixed