I have installed rvm (mutiuser option) and ruby using "rvm install" on my test server running Ubuntu. If I log in and execute "ruby test.rb", the script runs correctly. But If I execute it using "exec" from my php code, I get an error.
If I "su www-data" and try to execute the script then I get the same error, so I guess the question is how to get "www-data" to have the correct environment to execute Ruby scripts. I ve already tried adding "www-data" to "rvm" group and doesn t work. If I give the full path to Ruby bin, then the script executes, but fails when requiring gems.
我也试图执行一个.子,即阴道线是“rvm使用废墟-xxx”,第二行是“reby test.rb” , does干。
我是否应当使用“吸收目标安装”安装Rub?
感谢很多。