如何使rvm在fcgi中运行? [英] How to get rvm running inside fcgi?

查看:96
本文介绍了如何使rvm在fcgi中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Apache + Fcgi上运行的Rails 2.3应用程序,我正在将其迁移到Rails 3.1 + rvm(+ Apache + Fcgi).

I had a rails 2.3 application running on apache + fcgi, and I am migrating it to rails 3.1 + rvm (+ apache + fcgi).

我现在在fcgi<-> rvm处被封锁.

I am now blocked at fcgi <-> rvm.

我尝试将#!/usr/local/bin/rvm 1.9.2@rails31 exec ruby放入我的public/dispatch.fcgi中.

从我的命令行运行/usr/local/bin/rvm use 1.9.2@rails31 exec ruby /some_path/current/public/dispatch.fcgi可以正常工作,但是apache日志显示:

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:

错误:无法识别的命令行参数:'/some_path/current/public/dispatch.fcgi'(请参阅:'rvm用法')

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 ?

感谢您的回答.

推荐答案

还没有尝试过自己,但是类似的事情

Haven't tried myself but how about something like

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

按照如何在Shell&中使用Ruby的RVM安装CGI脚本? (如果您在用户目录本地安装了RVM,则路径应为〜/.rvm/bin/...

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

这篇关于如何使rvm在fcgi中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆