EDIT: Turns out Jacob was right, sorry for the downside. I decided to expand this solution a bit.
I could, as it turned out, use the rvm binary now, but since it is installed by the user, it is not located on $ PATH on my laptop
bigbuk:~ julik$ which rvm bigbuk:~ julik$
but it is on the server.
[ julik@serveur ~]$ which rvm /usr/local/rvm/bin/rvm [ julik@serveur ~]$
That's what confused me. Only it should be called with an absolute path (since FCGI works without setting the PATH correctly). Se, then the binary path should be configured accordingly, AND Of course, rvm will set GEM_HOME and GEM_PATH correctly for us. The only thing you really need to install is BUNDLE_GEMFILE, because the Bundler cannot automatically determine this from the rackup file, and the cdd of the FCGI process is garbage.
"bin-path" => "/usr/local/rvm/bin/rvm 1.9.2-p180 exec bundle exec rackup /home/user/websites/behandelaar-web/current/web-root/", "bin-environment" => ( "BUNDLE_GEMFILE" => "/home/user/websites/behandelaar-web/current/Gemfile", "RACK_ENV" => "production", ),
However, having a specific shell script written in Ruby has some merit, since both the rawn and bundle packages are very bad with intermittent exceptions , and if they say there are problems with the FCGI stone itself (this was what I had - with processing of string bytes by 1.8), this exception will not be correctly pushed through this multi-level package of wrappers and The most insightful thing that you will see in error reports will be status-500 from your web server.
Julik source share