简体   繁体   中英

How do I specify to rails which version of ruby I would like to use?

Before judging this question please listen to these details: I have tried twenty million things to "update" ruby so that it is compatible with ruby on rails. The problem is that I cannot make changes to anything in the bin of my macbook. The terminal simply does not allow it. So, I installed a new version of ruby via the command line that is 2.5.1. How do I direct rails via the terminal to use this version instead of the version in my bin?

From the official Rails Guides website.

  • Rails 6 requires Ruby 2.4.1 or newer.
  • Rails 5 requires Ruby 2.2.2 or newer.
  • Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
  • Rails 3.2.x is the last branch to support Ruby 1.8.7.
  • Rails 3 and above require Ruby 1.8.7 or higher.

While Rails 6 is still unreleased, this is a preliminary guess, given from the current master-branch of the official repository, at https://github.com/rails/rails/blob/master/guides/source/upgrading_ruby_on_rails.md

From edge-guides:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM