I'd a rails 2.3 application running on apache + fcgi, and i'm moving it to rails 3.1 + rvm (+ apache + fcgi).

I'm now blocked at fcgi <-> rvm.

I attempted putting #!/usr/local/bin/rvm 1.9.2@rails31 exec rubywithin my public/dispatch.fcgi.

Running /usr/local/bin/rvm use 1.9.2@rails31 exec ruby /some_path/current/public/dispatch.fcgi from the command line works fine, however the apache log shows:

ERROR: Unacknowledged command line argument(s): '/some_path/current/public/dispatch.fcgi ' ( see: 'rvm usage' )

Any concept of what's going on ? How should configure things to make this happen ?

Interesting solutions.

Haven't attempted myself but what about something similar to

#!/usr/bin/env /usr/local/bin/ruby-1.9.2-p180

following a instructions at How to use RVM installs of Ruby in shell & CGI scripts? (For those who have RVM installed in your area at user directory, the road could be something similar to ~/.rvm/bin/...