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


#1

I’m seeing this error in CloudWatch, when trying to deploy a rails app with jets afterburner.

I’ve tried everything google suggests to solve this problem, to no avail.

This is my Gemfile:

source 'https://rubygems.org'

ruby "2.5.3"

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem 'friendly_id'

gem 'goldiloader'

gem 'nokogiri'

gem 'pg'

gem "webpacker", git: "https://github.com/tongueroo/webpacker.git", branch: "jets"

# gem 'typed_dag'
gem 'typed_dag', :git => 'https://github.com/amadeuspagel/typed_dag'

# gem "therubyracer"
# gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS

# gem 'oj'

# gem 'gon'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2'
# Use sqlite3 as the database for Active Record
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use Uglifier as compressor for JavaScript assets
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby



# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

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]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
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'
  gem 'listen', '>= 3.0.5', '< 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'

  gem 'pry'
  gem 'rspec'

  gem 'rack-mini-profiler'

  gem 'uglifier', '>= 1.3.0'

# Use SCSS for stylesheets
  gem 'sass-rails', '~> 5.0'

end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem "string-include_any", "~> 1.0"

gem 'redis-rails'


gem "net-telnet", "~> 0.2.0"

gem "bootsnap", "~> 1.4"

gem "pg_search", "~> 2.3"

This is my Gemfile.lock

GIT
  remote: https://github.com/amadeuspagel/typed_dag
  revision: c660f71627806e535907b870a6b5b1d71b3b259b
  specs:
    typed_dag (2.0.2)
      rails (>= 5.0.4)

GIT
  remote: https://github.com/tongueroo/webpacker.git
  revision: 1a012c92ef7b9429759aa8c28293468e19c5a18b
  branch: jets
  specs:
    webpacker (3.2.0)
      activesupport (>= 4.2)
      rack-proxy (>= 0.6.1)
      railties (>= 4.2)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.2.4.1)
      actionpack (= 5.2.4.1)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailer (5.2.4.1)
      actionpack (= 5.2.4.1)
      actionview (= 5.2.4.1)
      activejob (= 5.2.4.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.2.4.1)
      actionview (= 5.2.4.1)
      activesupport (= 5.2.4.1)
      rack (~> 2.0, >= 2.0.8)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.2.4.1)
      activesupport (= 5.2.4.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.2.4.1)
      activesupport (= 5.2.4.1)
      globalid (>= 0.3.6)
    activemodel (5.2.4.1)
      activesupport (= 5.2.4.1)
    activerecord (5.2.4.1)
      activemodel (= 5.2.4.1)
      activesupport (= 5.2.4.1)
      arel (>= 9.0)
    activestorage (5.2.4.1)
      actionpack (= 5.2.4.1)
      activerecord (= 5.2.4.1)
      marcel (~> 0.3.1)
    activesupport (5.2.4.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    arel (9.0.0)
    bcrypt (3.1.13)
    bindex (0.8.1)
    bootsnap (1.4.5)
      msgpack (~> 1.0)
    builder (3.2.4)
    byebug (11.0.1)
    capybara (2.18.0)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (>= 2.0, < 4.0)
    childprocess (3.0.0)
    coderay (1.1.2)
    concurrent-ruby (1.1.5)
    crass (1.0.5)
    diff-lcs (1.3)
    erubi (1.9.0)
    execjs (2.7.0)
    ffi (1.11.3)
    friendly_id (5.3.0)
      activerecord (>= 4.0.0)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    goldiloader (3.1.1)
      activerecord (>= 4.2, < 6.1)
      activesupport (>= 4.2, < 6.1)
    i18n (1.7.0)
      concurrent-ruby (~> 1.0)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.4.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (0.3.3)
      mimemagic (~> 0.3.2)
    method_source (0.9.2)
    mimemagic (0.3.3)
    mini_mime (1.0.2)
    mini_portile2 (2.4.0)
    minitest (5.13.0)
    msgpack (1.3.1)
    net-telnet (0.2.0)
    nio4r (2.5.2)
    nokogiri (1.10.7)
      mini_portile2 (~> 2.4.0)
    pg (1.1.4)
    pg_search (2.3.0)
      activerecord (>= 4.2)
      activesupport (>= 4.2)
    pry (0.12.2)
      coderay (~> 1.1.0)
      method_source (~> 0.9.0)
    public_suffix (4.0.1)
    puma (3.12.2)
    rack (2.0.8)
    rack-mini-profiler (1.1.4)
      rack (>= 1.2.0)
    rack-proxy (0.6.5)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (5.2.4.1)
      actioncable (= 5.2.4.1)
      actionmailer (= 5.2.4.1)
      actionpack (= 5.2.4.1)
      actionview (= 5.2.4.1)
      activejob (= 5.2.4.1)
      activemodel (= 5.2.4.1)
      activerecord (= 5.2.4.1)
      activestorage (= 5.2.4.1)
      activesupport (= 5.2.4.1)
      bundler (>= 1.3.0)
      railties (= 5.2.4.1)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.3.0)
      loofah (~> 2.3)
    railties (5.2.4.1)
      actionpack (= 5.2.4.1)
      activesupport (= 5.2.4.1)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.19.0, < 2.0)
    rake (13.0.1)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    redis (4.1.3)
    redis-actionpack (5.1.0)
      actionpack (>= 4.0, < 7)
      redis-rack (>= 1, < 3)
      redis-store (>= 1.1.0, < 2)
    redis-activesupport (5.2.0)
      activesupport (>= 3, < 7)
      redis-store (>= 1.3, < 2)
    redis-rack (2.0.6)
      rack (>= 1.5, < 3)
      redis-store (>= 1.2, < 2)
    redis-rails (5.0.2)
      redis-actionpack (>= 5.0, < 6)
      redis-activesupport (>= 5.0, < 6)
      redis-store (>= 1.2, < 2)
    redis-store (1.8.1)
      redis (>= 4, < 5)
    rspec (3.9.0)
      rspec-core (~> 3.9.0)
      rspec-expectations (~> 3.9.0)
      rspec-mocks (~> 3.9.0)
    rspec-core (3.9.0)
      rspec-support (~> 3.9.0)
    rspec-expectations (3.9.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.9.0)
    rspec-mocks (3.9.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.9.0)
    rspec-support (3.9.0)
    ruby_dep (1.5.0)
    rubyzip (2.0.0)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.1.0)
      railties (>= 5.2.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    selenium-webdriver (3.142.6)
      childprocess (>= 0.5, < 4.0)
      rubyzip (>= 1.2.2)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    string-include_any (1.0.0)
    thor (1.0.1)
    thread_safe (0.3.6)
    tilt (2.0.10)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.7.1)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.4)
    xpath (3.2.0)
      nokogiri (~> 1.8)

PLATFORMS
  ruby
  x86_64-linux

DEPENDENCIES
  bcrypt (~> 3.1.7)
  bootsnap (~> 1.4)
  byebug
  capybara (~> 2.13)
  friendly_id
  goldiloader
  listen (>= 3.0.5, < 3.2)
  net-telnet (~> 0.2.0)
  nokogiri
  pg
  pg_search (~> 2.3)
  pry
  puma (~> 3.7)
  rack-mini-profiler
  rails (~> 5.2)
  redis-rails
  rspec
  sass-rails (~> 5.0)
  selenium-webdriver
  string-include_any (~> 1.0)
  typed_dag!
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)
  webpacker!

RUBY VERSION
   ruby 2.5.5p157

#2

Maybe try getting rid of the platforms in the Gemfile.


#3

Didn’t help. Still get the same error.


#4

Weird. Guess the error says that and is trying its best to provide a helpful message but the underlying issue is something else. Unsure here. :thinking:

Just in case, try to clean the build directory and deploying again. https://rubyonjets.com/reference/jets-clean-build/


#5

Running clean:build didn’t help either.


#6

:thinking: Unsure. Maybe try the demo rails app https://github.com/tongueroo/demo-rails That, at least, eliminates if its specific to the app. Then add gems back in, until it’s reproduced.


#7

I already tried it with a new app, and I did eventually get that to work. I didn’t try adding all the gems yet, because some gems throw errors unless you run an installer, but maybe I should still do that.


#9

This gemfile works with a new project, but not with mine:

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


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.7'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

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]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
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'
  gem 'listen', '>= 3.0.5', '< 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'
  # Use SCSS for stylesheets
  gem 'sass-rails', '~> 5.0'
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '>= 1.3.0'
  # See https://github.com/rails/execjs#readme for more supported runtimes
  # gem 'therubyracer', platforms: :ruby
  
  # Use CoffeeScript for .coffee assets and views
  gem 'coffee-rails', '~> 4.2'
  # 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.5'

end

gem "friendly_id", "~> 5.3"

So the problem can’t be due to any particular gem, and must be in my app. Any ideas where to look?