铁路找不到铁路 - RBENV



RUBY 2.7.6Bundler 2.1.4版

无论我在GEMFILE中使用哪种版本的rails我得到以下错误

undler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 6.0.0) was resolved to 6.0.0, which depends on
railties (= 6.0.0)
source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '6.1.0'
# Use mysql as the database for Active Record
gem 'mysql2', '~> 0.3.18'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'

这可能是因为您有一个过时的sass-rails版本。

尝试以下步骤:

  1. 从Gemfile.lock中删除sass-rails的gem版本并运行bundle update
  2. 如果以上不起作用,请删除Gemfile.lock并运行bundle install,如果您的Gemfile中没有冲突的显式gem版本。因此,如果失败,请从Gemfile中删除版本号

希望这能有所帮助!

最新更新