When I run bundle install
this is the response I get
"Your bundle only supports platforms [] but your local platforms are ["ruby",
"x86_64-darwin-19"], and there’s no compatible match between those two lists."
I have googled the error but can’t find an answer that works for me, the error itself seems to be uncommon.
I ran bundle env
, and this is what I get.
Environment
Bundler 2.1.4
Platforms ruby, x86_64-darwin-19
Ruby 2.7.0p0 (2019-12-25 revision 647ee6f091eafcce70ffb75ddf7e121e192ab217) [x86_64-darwin19]
Full Path /Users/cykalu/.rbenv/versions/2.7.0/bin/ruby
Config Dir /Users/cykalu/.rbenv/versions/2.7.0/etc
RubyGems 3.1.4
Gem Home /Users/cykalu/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0
Gem Path /Users/cykalu/.gem/ruby/2.7.0:/Users/cykalu/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0
User Home /Users/cykalu
User Path /Users/cykalu/.gem/ruby/2.7.0
Bin Dir /Users/cykalu/.rbenv/versions/2.7.0/bin
Tools
Git 2.23.0
RVM not installed
rbenv rbenv 1.1.2
chruby not installed
Bundler Build Metadata
Built At 2020-01-05
Git SHA 32a4159325
Released Version true
Bundler settings
deployment
Set for the current user (/Users/cykalu/.bundle/config): true
path
Set for your local app (/Users/cykalu/Documents/GitHub/rails_app/.bundle/config): "vendor/bundle"
Gemfile
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
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.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
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock
3
Answers
You are getting this error because of the
deployment
setting in your~/.bundle/config
being set totrue
. Do you recall adding this to your computer? If this is your development machine, you shouldn’t use that Bundler setting. What’s happening is that whendeployment
istrue
, Bundler expects aGemfile.lock
to already be checked into version control, and because yours is blank, it can’t find any platforms listed, and you get that error about the bundle only supporting platforms [] because there are none.So, to be able to generate the
Gemfile.lock
withbundle install
, you need to open up your~/.bundle/config
and remove this line:try:
bundle lock --add-platform x86_64-linux
Try:
For more details please see the "Remediation" section under this heroku-buildpack-ruby issue.