问题描述
我运行了 bundle update rails
并得到了这个。我难住了。如果 activerecord-session_store
2.0 依赖于 5.2.4.1 和更高版本之间的 actionpack
版本,并且如果 actionpack 是 Rails 6 的依赖项,这应该没问题吗?
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
activerecord-session_store (~> 2.0) was resolved to 2.0.0,which depends on
actionpack (>= 5.2.4.1)
rails (~> 6.0.3.6) was resolved to 6.0.3.6,which depends on
actionpack (= 6.0.3.6)
devise (~> 4.2) was resolved to 4.8.0,which depends on
responders was resolved to 3.0.1,which depends on
actionpack (>= 5.0)
我的 gemfile 是:
source 'https://rubygems.org'
ruby '2.5.0'
gem 'rails','~> 6.0.3.6'
gem 'pg',' 0.18.3'
gem 'devise','~> 4.2'
gem 'aws-sdk-s3','~> 1.75',require: false
gem 'friendly_id','~> 5.1'
gem 'pagy','~> 3.7','>= 3.7.2'
gem 'activerecord-session_store','~> 2.0'
gem 'sprockets','3.7.2'
gem 'aasm','~> 5.0'
gem 'redis','~> 4.1','>= 4.1.3'
gem 'sidekiq','~> 6.0','>= 6.0.4'
gem 'local_time','~> 2.1'
gem 'stripe','~> 5.11'
gem 'stripe_event','~> 2.3'
gem 'lockbox','~> 0.4.8'
gem 'mailgunner','~> 2.4'
gem 'rack-attack'
gem 'honeypot-captcha','~> 1.0','>= 1.0.1'
gem 'rack-timeout','~> 0.6.0'
gem 'pry','0.13.1'
gem 'image_processing','~> 1.11'
gem 'shrine','~> 3.3.0'
gem 'marcel','~> 0.3.3'
gem 'webpacker','~> 5.2','>= 5.2.1'
gem 'json','~> 2.3','>= 2.3.1'
解决方法
嗯;如果我用你的 VStack(alignment: .custom) {
ForEach(Colors.allCases) { color in
HStack {
color.asColor.aspectRatio(contentMode: .fit)
.alignmentGuide(.custom) { d in
d[.leading]
}
Text(color.rawValue)
.frame(maxWidth: .infinity)
.fixedSize()
}
}
.frame(height: 50)
}
/* ... */
extension HorizontalAlignment {
struct CustomAlignment: AlignmentID {
static func defaultValue(in context: ViewDimensions) -> CGFloat {
return context[HorizontalAlignment.leading]
}
}
static let custom = HorizontalAlignment(CustomAlignment.self)
}
尝试 bundle install
我得到
Gemfile
因此,请尝试将 Bundler could not find compatible versions for gem "marcel":
In Gemfile:
marcel (~> 0.3.3)
rails (~> 6.0.3.6) was resolved to 6.0.3.6,which depends on
activestorage (= 6.0.3.6) was resolved to 6.0.3.6,which depends on
marcel (~> 1.0.0)
中的 marcel
版本更新为 Gemfile
,然后是 "~> 1.0.0"
。