I had a rails 2.3 application running on apache + fcgi, and I am migrating it to rails 3.1 + rvm (+ apache + fcgi).
I am now blocked at fcgi <-> rvm.
I tried putting #!/usr/local/b开发者_StackOverflow中文版in/rvm 1.9.2@rails31 exec ruby
inside my public/dispatch.fcgi
.
Running /usr/local/bin/rvm use 1.9.2@rails31 exec ruby /some_path/current/public/dispatch.fcgi
from my command line works fine, but the apache log shows:
ERROR: Unrecognized command line argument(s): '/some_path/current/public/dispatch.fcgi ' ( see: 'rvm usage' )
Any idea of what is going on ? How should configure things to make this work ?
Thanks for your answers.
Haven't tried myself but how about something like
#!/usr/bin/env /usr/local/bin/ruby-1.9.2-p180
following the instructions at How to use RVM installs of Ruby in shell & CGI scripts? (If you have RVM installed locally at user directory, the path would be something like ~/.rvm/bin/...
精彩评论