How to get rvm running inside fcgi?

不想你离开。 提交于 2019-12-24 01:25:17

问题


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/bin/rvm 1.9.2@rails31 exec rubyinside 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.


回答1:


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/...



来源:https://stackoverflow.com/questions/6875690/how-to-get-rvm-running-inside-fcgi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!