简体   繁体   English

如何在不同 Ruby 版本的轨道上远程协作?

[英]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.12.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.

相关问题 如何在使用不同版本的rails的rails应用程序上运行ruby? - How to run ruby on rails apps with different versions of rails? 为什么有不同的Ruby On Rails版本? - Why are there different Ruby On Rails versions? 如何在具有不同Ruby / Rails版本的两个应用程序上工作? - How do I working on two apps with different Ruby/Rails versions? 如何在同一开发机器上运行不同的Ruby版本和Rails版本 - How to Run different Ruby versions and Rails version on same development machine 管理许多不同版本的Ruby on Rails应用程序 - Managing many Ruby on Rails applications of different versions Gemfile中用于环境的不同红宝石版本,用于Rails应用程序 - Different ruby versions by environment in a Gemfile for rails application Rails和Ubuntu报告不同的ruby版本 - Rails and Ubuntu reporting different ruby versions 在 Rails 中,如何通过 ruby​​-install 在不同版本的 Ruby 上运行多个版本的 puma-dev? - In Rails, how do you have multiple versions of puma-dev running on different versions of Ruby via ruby-install? 在本地运行Rails应用程序上的ruby-不同版本的ruby - Running a ruby on rails app locally - Different versions of ruby 具有不同的ruby和rails版本的rails的服务器设置选项 - Server setup option for rails with different ruby and rails versions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM