我是Rails环境的新手,正在尝试使用Solidus gem构建一个电子商务站点,但在bundle install命令过程中遇到了以下依赖问题。
The dependency byebug (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies..................
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 5.0.2)
In Gemfile:
rails (~> 5.0.2) x86-mingw32
solidus x86-mingw32 was resolved to 1.0.0, which depends on
solidus_frontend (= 1.0.0) x86-mingw32 was resolved to 1.0.0, which
depends on
canonical-rails (~> 0.0.4) x86-mingw32 was resolved to 0.0.11, which
depends on
rails (< 5.0, >= 3.1) x86-mingw32
solidus x86-mingw32 was resolved to 1.0.0, which depends on
solidus_core (= 1.0.0) x86-mingw32 was resolved to 1.0.0, which depends on
deface (~> 1.0.0) x86-mingw32 was resolved to 1.0.2, which depends on
rails (>= 3.1) x86-mingw32
solidus x86-mingw32 was resolved to 1.0.0, which depends on
solidus_core (= 1.0.0) x86-mingw32 was resolved to 1.0.0, which depends on
rails (~> 4.2.0) x86-mingw32
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.下面是我的Gem文件:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'rails', '~> 5.0.2'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'solidus'
gem 'solidus_auth_devise'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]我正在使用以下版本的Rails和Ruby。
C:\Users\user>rails -v
Rails 5.0.2
C:\Users\user>ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]PS:我使用的是Windows 10
发布于 2017-03-14 18:13:09
在论文点击需求中,你可以找到ImageMagick:https://rubygems.org/gems/paperclip
转到github并按照说明进行操作。https://github.com/thoughtbot/paperclip
下面的帖子将为您提供Windows环境Paperclip::Errors::NotIdentifiedByImageMagickError on Windows 7中回形针错误的解决方案
相对于第一个错误"Bundler找不到gem rails的兼容版本“,我找到了下面的帖子。他们说要运行rm Gemfile.lock,然后再运行bundle install,但是我很担心这个。切勿编辑您的Gemfile.lock,这将删除它Bundler could not find compatible versions for gem, updating Rails app
请注意,在您的gemfile之上没有ruby版本,而且您使用的是rails 5.0.2,这是一个非常新的版本。你能发布终端命令ruby -v和rails -v的输出吗?那么你可以运行bundle list并发布输出吗?
https://stackoverflow.com/questions/42744759
复制相似问题