First you need to have RVM installed, then install Ruby which is required with RVM
1. Start the passenger of that Ruby version with
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/passenger start -a 127.0.0.1 -p 4004 -d
2.Then you need to add the proxy pass for that rails app (domain) to the port 4004. Here ‘m using port 4004 for example, you may choose necessary port. And make the following changes in apache configuration file under the virtual host entry of the domain
ServerName http://www.praveen .com
ProxyPass / http://127.0.0.1:4004/
ProxyPassReverse / http://127.0.0.1:4004/
3. Generate .rvmrc file under the domain’s document root to have the particular ruby version for the domain
Main reason to create a .rvmrc file is, the particular ruby version is fixed to the domain
rvm –create –rvmrc ruby-1.9.3-p392@app_name
Then cd .. and cd -
also check if there is any .rvmrc file under previous directories which creates some issue, in fact newly generated .rvmrc file will be over written by previous directory’s .rvmrc file.
3.Restart apache and check.