【发布时间】:2022-01-25 20:21:55
【问题描述】:
我 git 克隆了我自己的 repo,当我想启动时(rails s),即使我安装了 Rails,也会有安装 Rails 的请求(sudo apt install ruby-railties)。如果我开始安装(gem install rails),会出现Ruby版本太旧的提示:
ERROR: Error installing rails:
There are no versions of activesupport (= 7.0.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.6.146.
如果我切换到请求的版本(rvm 使用 2.7),当我运行 rails s 时会出现以下消息:
Could not find proper version of railties (6.1.4.1) in any of the sources
Run `bundle install` to install missing gems.
当我进行捆绑安装时,需要切换 Ruby 版本:
Your Ruby version is 2.7.2, but your Gemfile specified 2.6.6
这相当于回到起点。这个愚蠢的循环使我无法完成捆绑安装,因此无法完成 rails s。
【问题讨论】:
标签: ruby-on-rails ruby postgresql