Answer the question
In order to leave comments, you need to log in
How to use different versions of Ruby and Rails for each project in RoR?
I started to learn RoR and a couple of questions arose. I have experience in PHP and Django. And in Django, you can use different versions of Python for each project, creating a separate environment. That is, by creating an environment, you can install a python of any version inside the environment and then run Django under this environment. In RoR on this part, I still do not understand at all. installed ruby in Ubuntu, then rails and start creating projects by typing rails new project_name. If I need to run the project under a different version of rails, will I have to change the version in the system (in this case, there may be errors in existing versions due to version mismatch) or what? Please explain this point.
Answer the question
In order to leave comments, you need to log in
1) Install RVM
2) Through RVM, install the ruby versions that you need for projects
In the nginx + passenger bundle, in the nginx config, you can specify which version to use:
passenger_ruby /Users/your_user/.rvm/gems/ruby-2.3.0/wrappers/ruby;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question