简体   繁体   中英

How to collaborate remotely in rails with different Ruby versions?

Is there a way to generate a rails project with a 'minimum' Ruby version? Perhaps to exclude the version altogether?

Situation: I am working on an introductory rails project with a remote partner (paired programming). We have a small difference in ruby version (2.5.1 and 2.5.8).

Set-up: $ rails _5.2.3_ new my_project_name -G --database=postgresql

We then update the gemfile to allow 'at least' version 2.5.1: ruby '~> 2.5.1'

Each time we pass the project it requires that we edit the /.ruby-version file to 2.5.1 and 2.5.8 respectively.

This /.ruby-version change is what I am trying to solve more permanently.

I am new to programming so any help would be appreciated, thank you!

There are ways you could force this to happen (go down the rabbit hole of .gitignore ing ruby version, etc)....but by far , the best way is to be developing on the same ruby version.

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