[英]How to collaborate remotely in rails with different Ruby versions?
Is there a way to generate a rails project with a 'minimum' Ruby version?有没有办法生成具有“最低” Ruby 版本的 rails 项目? Perhaps to exclude the version altogether?也许完全排除该版本?
Situation: I am working on an introductory rails project with a remote partner (paired programming).情况:我正在与一个远程合作伙伴(配对编程)进行一个介绍性的 Rails 项目。 We have a small difference in ruby version (2.5.1 and 2.5.8).我们在 ruby 版本(2.5.1 和 2.5.8)上存在细微差别。
Set-up: $ rails _5.2.3_ new my_project_name -G --database=postgresql
设置: $ 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'
然后我们更新 gemfile 以允许'至少'版本 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.每次我们通过项目时,都需要将/.ruby-version
文件分别编辑为2.5.1
和2.5.8
。
This /.ruby-version
change is what I am trying to solve more permanently.这个/.ruby-version
更改是我想要更永久地解决的问题。
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.有一些方法可以强迫这种情况发生(进入.gitignore
的兔子洞 ruby 版本等)......但到目前为止,最好的方法是在相同的 ruby 版本上进行开发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.