Ruby on rails 从rails 5.1升级到5.2时,如何更新您的文件?

Ruby on rails 从rails 5.1升级到5.2时,如何更新您的文件?,ruby-on-rails,Ruby On Rails,我正在尝试将rails应用程序从5.1.4升级到5.2 我已经完成了以下步骤: 但是,这完全忽略了如何更新您的文件 当我改变 gem 'rails', '~> 5.1.4' 到 我收到错误消息: Bundler could not find compatible versions for gem "activesupport": In snapshot (Gemfile.lock): activesupport (= 5.1.6.1) In Gemfile:

我正在尝试将rails应用程序从5.1.4升级到5.2

我已经完成了以下步骤:

但是,这完全忽略了如何更新您的文件

当我改变

gem 'rails', '~> 5.1.4'

我收到错误消息:

Bundler could not find compatible versions for gem "activesupport":
  In snapshot (Gemfile.lock):
    activesupport (= 5.1.6.1)

  In Gemfile:
    rails (~> 5.2.2) was resolved to 5.2.2, which depends on
      activesupport (= 5.2.2)

    sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
      railties (>= 4.0.0, < 6) was resolved to 5.1.6.1, which depends on
        activesupport (= 5.1.6.1)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler找不到gem“activesupport”的兼容版本:
在快照(Gemfile.lock)中:
主动支撑(=5.1.6.1)
在文件中:
rails(~>5.2.2)已解析为5.2.2,这取决于
主动支持(=5.2.2)
sass rails(~>5.0)已解析为5.0.7,这取决于
railties(>=4.0.0,<6)已解析为5.1.6.1,这取决于
主动支撑(=5.1.6.1)
运行“bundle update”将从头开始重建快照,只需使用
GEM文件中的GEM,这可能会解决冲突。
我可以解决这些错误,但这似乎是一种不完整的更新方式


更新GEM文件的正确方法是什么?

捆绑更新rails


在此之后,您可以使用gem“bundleup”查看您可以更新的其他gem。

您使用的是什么命令<代码>bundle安装或
bundle更新
?Ruby Sass(用Ruby编写的Sass解析器)和Sass rails,将于2019年3月26日取消维护。你应该用宝石来代替。相反,它使用了比旧的ruby解析器快得多的语法。
Bundler could not find compatible versions for gem "activesupport":
  In snapshot (Gemfile.lock):
    activesupport (= 5.1.6.1)

  In Gemfile:
    rails (~> 5.2.2) was resolved to 5.2.2, which depends on
      activesupport (= 5.2.2)

    sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
      railties (>= 4.0.0, < 6) was resolved to 5.1.6.1, which depends on
        activesupport (= 5.1.6.1)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.