0

I am new to Rails environment and am trying to build an e-commerce site using Solidus gem but getting below dependency issue during bundle install command.

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.

Below is my Gem File:

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]

I am using following versions of Rails and 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: I am using Windows 10

  • what about this line of code `gem 'byebyg', platform: :mri` . As my understanding that is the Windows Version. Could you comment it, rung `bundle install` and retest everything again to see what is the real problem. Also I read this post. http://stackoverflow.com/questions/42683402/rescue-in-block-2-levels-in-require-there-was-an-error-while-trying-to-load What was the output of running `bundle lock --add-platform ruby`? – Fabrizio Bertoglio Mar 12 '17 at 09:33
  • Giving same error - "Bundler could not find compatible versions for gem rails" after commenting byebug gem and running bundle install. bundle lock --add-platform ruby is also giving same error. I have also tried running bundle update command which ran fine but now having issues with "bundle exec rails g spree:install" command. Its saying "rake aborted - Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError". I have ImageMagick already installed on my machine. – Ankit Maheshwari Mar 14 '17 at 09:54

1 Answers1

0

Between paperclick requirements you can find ImageMagick: https://rubygems.org/gems/paperclip

Go to github and follow the instructions. https://github.com/thoughtbot/paperclip

Following post give you as solution for paperclip error in Windows Environment Paperclip::Errors::NotIdentifiedByImageMagickError on Windows 7

Relatively to the first error "Bundler could not find compatible versions for gem rails" I found the following post. They say to run rm Gemfile.lock and run again bundle install, but I am worried about this. You should never edit your Gemfile.lock This will delete it Bundler could not find compatible versions for gem, updating Rails app

Just noticing that you do not have the ruby version on top of your gemfile, also you are using rails 5.0.2 which it is very new version. Could you post the output of terminal command ruby -v and rails -v. Then could you run bundle list and post the output.

Community
  • 1
  • 1
Fabrizio Bertoglio
  • 5,890
  • 4
  • 16
  • 57