有没有人可以帮我把rails 4.2升级到rails 5.1.4在运行捆绑包更新后得到兼容版本错误
Bundler找不到gem“actionpack”的兼容版本:在Gemfile中: active_link_to (~> 1.0.0)已解析为1.0.5,这取决于actionpack
active_model_serializers (~> 0.10.6) was resolved to 0.10.7, which depends on
actionpack (< 6, >= 4.1)
hamlit-rails (~> 0.2.0) was resolved to 0.2.0, which depends on
actionpack (>= 4.0.1)
meta-tags (~> 2.4.1) was resolved to 2.4.1, which depends on
actionpack (< 5.2, >= 3.2.0)
rails (~> 5.1.4) was resolved to 5.1.4, which depends on
actionpack (= 5.1.4)
ransack (~> 1.6.6) was resolved to 1.6.6, which depends on
actionpack (>= 3.0)
rspec-rails (~> 3.4.2) was resolved to 3.4.2, which depends on
actionpack (< 4.3, >= 3.0)
simple_form (~> 3.5.1) was resolved to 3.5.1, which depends on
actionpack (< 5.2, > 4)
stream_rails (>= 2.5.2, ~> 2.5) was resolved to 2.6.1, which depends on
actionpack (>= 3.0.0)
twitter-typeahead-rails (~> 0.10.5) was resolved to 0.10.5, which depends on
actionpack (>= 3.1)发布于 2018-04-30 18:26:21
您的rspec-rails阻止了升级。bundler输出显示了这一部分:
actionpack (< 4.3, >= 3.0)所以rspec-rails会阻止任何大于4.2的值。
将rspec-rails约束~> 3.4.2释放为更宽松的内容,如~> 3.5,然后重试
bundle update rails rspec-rails通常,在升级Rails时,可以将bundle update rails与所有对Rails有特定版本要求或在bundler中提到的Gem一起尝试。
发布于 2018-09-14 02:05:46
删除您的Gemfile.lock并将其添加到您的Gemfile
source 'https://rubygems.org'别忘了更新你的其他gem。
发布于 2019-07-30 00:49:28
这发生在我试图更新到Rails6的时候。以下是我的解决方法。
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.3'
gem 'rails', '6.0.0.rc1'
gem 'sqlite3'
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'activerecord-import'
gem 'bootsnap'
gem "rspec"
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubinius-developer_tools'
endhttps://stackoverflow.com/questions/50098395
复制相似问题