Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle install error - Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"]

Tags:

ruby

bundler

Getting this error doing a bundle install; google around seems like a common issue but I can't seem to find the fix (seem suggestion on Gemfile.lock but I moved that file to another directory)

# bundle install

Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two lists.

Here's my Gemfile and there is no Gemfile.lock in the directory.

[root@ip-172-30-4-16 rails]# gem -v
2.6.11
[root@ip-172-30-4-16 rails]# ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
[root@ip-172-30-4-16 rails]# bundle -v
Bundler version 1.14.6

[root@ip-172-30-4-16 rails]# cat Gemfile
source 'http://rubygems.org'

gem 'echoe'
gem 'rails', '~> 3.2.11'
gem 'mysql2'
gem 'prawn', '~> 0.5.0.1'
gem 'prawn-core', '~> 0.5.0.1', :require => 'prawn/core'
gem 'prawn-layout', '~> 0.2.0.1', :require => 'prawn/layout'
gem 'prawn-format', '~> 0.2.0.1', :require => 'prawn/format'
gem 'spreadsheet', '~> 0.6.5'
gem 'libxml-ruby', :require => 'libxml_ruby'
gem 'faker'
gem 'json'
gem 'rake'
gem 'jquery-rails'
gem 'therubyracer'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'memcache-client'
gem 'rb-readline'
gem 'rubyzip', '~> 1.0.0'
gem 'zip-zip' # Rubyzip old API compatibility addon

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

#group :development do
#  gem 'ruby-debug19'
#end

group :test do
  gem 'flexmock', '= 0.9.0'
  gem 'machinist', '= 2.0'
  gem 'test-unit', '~> 1.2.3'
  # Use SimpleCov and Coveralls for test coverage reports
  gem 'simplecov'
  gem 'coveralls'
end

group :production do
  gem 'passenger'
end

group :test, :development do
  gem 'rspec-rails', '~> 2.0'
end
like image 454
AnthonyC Avatar asked Mar 23 '17 05:03

AnthonyC


People also ask

What is a gemlock file?

The Gemfile. lock allows you to specify the versions of the dependencies that your application needs in the Gemfile , while remembering all of the exact versions of third-party code that your application used when it last worked correctly. By specifying looser dependencies in your Gemfile (such as nokogiri ~> 1.4.

How do I update my bundler?

Upgrading applications from Bundler 1 to Bundler 2 Bundler will never change your application to a new major version until you choose to do so. If your application is ready, you can upgrade that application to the latest installed version of Bundler by running bundle update --bundler .

How do I set gem version in Gemfile?

There are several ways to specify gem versions: Use a specific version: gem "name-of-gem", "1.0" . You can find specific versions on Rubygems.org (provided that's the source you”re using) by searching for your gem and looking at the “Versions” listed. Use a version operator: gem "name-of-gem", ">1.0" .


1 Answers

I had the same issue, I had to remove the .bundle directory and then bundle install worked.

like image 65
LightningStryk Avatar answered Sep 23 '22 13:09

LightningStryk