I have a very simple CGI server set up with lighttpd's mod_cgi
and I have a multi-user install of RVM. How can I set up lighttpd to use RVM's ruby and its default gems?
I tried adding the lighttpd user to the rvm group, but that seems useless since rvm use ...
only works from a login shell (and you can't log in as lighttpd).
I also tried just setting
".rb" => "/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby"
in /etc/lighttpd/conf.d/cgi.conf
. Then Ruby scripts work with CGI, but I still can't require any gems.