Docker Buildx missing files in building arm 64 rails image - ruby-on-rails

I am trying to build a arm64 image on a x64 linux os. The 64 bit version using docker build . ... works perfectly. On the docker buildx version though, I am missing several configuration files causing the deploy to fail.
The app is a rails app with webpacker. The missing files I've found so far are config/webpacker.yml and config/webpack/, and app/javascript/*.
Dockerfile:
FROM ruby:3.0.3-slim-bullseye
RUN apt-get update -qq &&\
apt install curl -y
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&\
apt-get update -qq &&\
apt-get install -y nodejs yarn \
build-essential \
libpq-dev libsqlite3-dev
RUN useradd --user-group --create-home --shell /bin/false app
ENV HOME=/home/app
USER app
WORKDIR $HOME/wedding
COPY --chown=app:app Gemfile ./
RUN bundle config set --local path 'vendor/bundle' &&\
bundle install
COPY --chown=app:app package.json yarn.lock ./
RUN yarn install
COPY --chown=app:app . .
RUN bundle exec rake webpacker:compile
# i even tried copying the file manually to no success
COPY --chown=app:app ./config/webpacker.yml ./config/
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
Docker build command:
docker buildx build --platform linux/arm64 -t my.registry.com/wedding --load .
Gemfile:
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.0.3"
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.1"
# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
# gem "jbuilder"
# gem 'activeadmin'
# gem 'devise'
# gem "auto_strip_attributes"
# gem "scenic"
# gem 'scenic_sqlite_adapter'
# gem 'webpacker'
# gem "sprockets"
# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ruby ]
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
# Use Sass to process CSS
# gem "sassc-rails"
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
end
group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end
group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
end
gem "activeadmin", "~> 2.11"
gem "devise", "~> 4.8"
gem "auto_strip_attributes", "~> 2.6"
gem "scenic", "~> 1.6"
gem "scenic_sqlite_adapter", "~> 0.1.0"
gem "webpacker", "~> 5.4"
Gemfile lock:
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.2.3)
actionpack (= 7.0.2.3)
activesupport (= 7.0.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.2.3)
actionpack (= 7.0.2.3)
activejob (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.2.3)
actionpack (= 7.0.2.3)
actionview (= 7.0.2.3)
activejob (= 7.0.2.3)
activesupport (= 7.0.2.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.2.3)
actionview (= 7.0.2.3)
activesupport (= 7.0.2.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.2.3)
actionpack (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.2.3)
activesupport (= 7.0.2.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activeadmin (2.11.1)
arbre (~> 1.2, >= 1.2.1)
formtastic (>= 3.1, < 5.0)
formtastic_i18n (~> 0.4)
inherited_resources (~> 1.7)
jquery-rails (~> 4.2)
kaminari (~> 1.0, >= 1.2.1)
railties (>= 6.0, < 7.1)
ransack (~> 2.1, >= 2.1.1)
activejob (7.0.2.3)
activesupport (= 7.0.2.3)
globalid (>= 0.3.6)
activemodel (7.0.2.3)
activesupport (= 7.0.2.3)
activerecord (7.0.2.3)
activemodel (= 7.0.2.3)
activesupport (= 7.0.2.3)
activestorage (7.0.2.3)
actionpack (= 7.0.2.3)
activejob (= 7.0.2.3)
activerecord (= 7.0.2.3)
activesupport (= 7.0.2.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
arbre (1.5.0)
activesupport (>= 3.0.0, < 7.1)
ruby2_keywords (>= 0.0.2, < 1.0)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
bcrypt (3.1.17)
bindex (0.8.1)
bootsnap (1.11.1)
msgpack (~> 1.2)
builder (3.2.4)
capybara (3.36.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (4.1.0)
concurrent-ruby (1.1.10)
crass (1.0.6)
debug (1.4.0)
irb (>= 1.3.6)
reline (>= 0.2.7)
devise (4.8.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
digest (3.1.0)
erubi (1.10.0)
formtastic (4.0.0)
actionpack (>= 5.2.0)
formtastic_i18n (0.7.0)
globalid (1.0.0)
activesupport (>= 5.0)
has_scope (0.8.0)
actionpack (>= 5.2)
activesupport (>= 5.2)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
importmap-rails (1.0.3)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
inherited_resources (1.13.1)
actionpack (>= 5.2, < 7.1)
has_scope (~> 0.6)
railties (>= 5.2, < 7.1)
responders (>= 2, < 4)
io-console (0.5.11)
io-wait (0.2.1)
irb (1.4.1)
reline (>= 0.3.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
loofah (2.15.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.15.0)
msgpack (1.4.5)
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
timeout
net-protocol (0.1.2)
io-wait
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.3-aarch64-linux)
racc (~> 1.4)
nokogiri (1.13.3-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
public_suffix (4.0.6)
puma (5.6.2)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.3)
rack-proxy (0.7.2)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.2.3)
actioncable (= 7.0.2.3)
actionmailbox (= 7.0.2.3)
actionmailer (= 7.0.2.3)
actionpack (= 7.0.2.3)
actiontext (= 7.0.2.3)
actionview (= 7.0.2.3)
activejob (= 7.0.2.3)
activemodel (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
bundler (>= 1.15.0)
railties (= 7.0.2.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (7.0.2.3)
actionpack (= 7.0.2.3)
activesupport (= 7.0.2.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
ransack (2.6.0)
activerecord (>= 6.0.4)
activesupport (>= 6.0.4)
i18n
regexp_parser (2.2.1)
reline (0.3.1)
io-console (~> 0.5)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.5)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
scenic (1.6.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
scenic_sqlite_adapter (0.1.0)
activerecord (>= 4.0.0)
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
stimulus-rails (1.0.4)
railties (>= 6.0.0)
strscan (3.0.1)
thor (1.2.1)
timeout (0.2.0)
turbo-rails (1.0.1)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2022.1)
tzinfo (>= 1.0.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.0.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.5.4)
PLATFORMS
aarch64-linux
x86_64-linux
DEPENDENCIES
activeadmin (~> 2.11)
auto_strip_attributes (~> 2.6)
bootsnap
capybara
debug
devise (~> 4.8)
importmap-rails
puma (~> 5.0)
rails (~> 7.0.1)
scenic (~> 1.6)
scenic_sqlite_adapter (~> 0.1.0)
selenium-webdriver
sprockets-rails
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
tzinfo-data
web-console
webdrivers
webpacker (~> 5.4)
RUBY VERSION
ruby 3.0.3p157
BUNDLED WITH
2.3.5

I found the issue, just a dumb configuration piece on my end. I had accidentally overwrote these directories with docker-compose volumes that had been cached from a previous install.
No issue here.

Related

How can I overcome Nokogiri dependency when dockerizing Ruby on Rails APi

I've been working on dockerizing a simple Ruby on Rails API with a SQL database, and I've been encountering the following error:
ERROR: It looks like you're trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17:
/lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so
If that's the case, then please install Nokogiri via the `ruby` platform gem: gem install nokogiri --platform=ruby or: bundle config set force_ruby_platform true
Please visit https://nokogiri.org/tutorials/installing_nokogiri.html for more help.
Here's my dockerfile
FROM ruby:3.0.0
RUN apt-get update && apt-get install -y build-essential
RUN apt-get install default-mysql-client -y
RUN mkdir /task
WORKDIR /task
ADD Gemfile /task/Gemfile
ADD Gemfile.lock /task/Gemfile.lock
RUN bundle install
ADD . /task
And here's my compose file
services:
db:
platform: linux/x86_64
image: mysql:8.0.20
restart: always
environment:
MYSQL_USER: root
MYSQL_DB: chat_system
MYSQL_HOST: db
MYSQL_ROOT_PASSWORD: password
ports:
- "3307:3306"
app:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- ".:/noteapp"
ports:
- "3001:3000"
depends_on:
- db
links:
- db
environment:
DB_USER: root
DB_NAME: chat_system
DB_PASSWORD: password
DB_HOST: db
Gemfile
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.0.0"
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.2", ">= 7.0.2.3"
# Use mysql as the database for Active Record
gem "mysql2", "~> 0.5"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
# gem "jbuilder"
# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
gem 'redis'
gem 'redis-namespace'
gem 'redis-rails'
gem 'redis-rack-cache'
gem 'sneakers'
gem 'bunny'
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem "rack-cors"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
end
group :development do
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.2.3)
actionpack (= 7.0.2.3)
activesupport (= 7.0.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.2.3)
actionpack (= 7.0.2.3)
activejob (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.2.3)
actionpack (= 7.0.2.3)
actionview (= 7.0.2.3)
activejob (= 7.0.2.3)
activesupport (= 7.0.2.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.2.3)
actionview (= 7.0.2.3)
activesupport (= 7.0.2.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.2.3)
actionpack (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.2.3)
activesupport (= 7.0.2.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.2.3)
activesupport (= 7.0.2.3)
globalid (>= 0.3.6)
activemodel (7.0.2.3)
activesupport (= 7.0.2.3)
activerecord (7.0.2.3)
activemodel (= 7.0.2.3)
activesupport (= 7.0.2.3)
activestorage (7.0.2.3)
actionpack (= 7.0.2.3)
activejob (= 7.0.2.3)
activerecord (= 7.0.2.3)
activesupport (= 7.0.2.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
amq-protocol (2.3.2)
bootsnap (1.11.1)
msgpack (~> 1.2)
builder (3.2.4)
bunny (2.19.0)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
concurrent-ruby (1.1.10)
crass (1.0.6)
debug (1.5.0)
irb (>= 1.3.6)
reline (>= 0.2.7)
digest (3.1.0)
erubi (1.10.0)
globalid (1.0.0)
activesupport (>= 5.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
io-console (0.5.11)
irb (1.4.1)
reline (>= 0.3.0)
loofah (2.16.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.15.0)
msgpack (1.5.1)
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
timeout
net-protocol (0.1.3)
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.3-arm64-darwin)
racc (~> 1.4)
puma (5.6.4)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.3)
rack-cache (1.13.0)
rack (>= 0.4)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.2.3)
actioncable (= 7.0.2.3)
actionmailbox (= 7.0.2.3)
actionmailer (= 7.0.2.3)
actionpack (= 7.0.2.3)
actiontext (= 7.0.2.3)
actionview (= 7.0.2.3)
activejob (= 7.0.2.3)
activemodel (= 7.0.2.3)
activerecord (= 7.0.2.3)
activestorage (= 7.0.2.3)
activesupport (= 7.0.2.3)
bundler (>= 1.15.0)
railties (= 7.0.2.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (7.0.2.3)
actionpack (= 7.0.2.3)
activesupport (= 7.0.2.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (12.3.3)
rbtree (0.4.5)
redis (4.6.0)
redis-actionpack (5.3.0)
actionpack (>= 5, < 8)
redis-rack (>= 2.1.0, < 3)
redis-store (>= 1.1.0, < 2)
redis-activesupport (5.3.0)
activesupport (>= 3, < 8)
redis-store (>= 1.3, < 2)
redis-namespace (1.8.2)
redis (>= 3.0.4)
redis-rack (2.1.4)
rack (>= 2.0.8, < 3)
redis-store (>= 1.2, < 2)
redis-rack-cache (2.2.1)
rack-cache (>= 1.10, < 2)
redis-store (>= 1.6, < 2)
redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2)
redis-store (1.9.1)
redis (>= 4, < 5)
reline (0.3.1)
io-console (~> 0.5)
serverengine (2.1.1)
sigdump (~> 0.2.2)
set (1.0.2)
sigdump (0.2.4)
sneakers (2.12.0)
bunny (~> 2.14)
concurrent-ruby (~> 1.0)
rake (~> 12.3)
serverengine (~> 2.1.0)
thor
sorted_set (1.0.3)
rbtree
set (~> 1.0)
strscan (3.0.1)
thor (1.2.1)
timeout (0.2.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.5.4)
PLATFORMS
arm64-darwin-21
DEPENDENCIES
bootsnap
bunny
debug
puma (~> 5.0)
rails (~> 7.0.2, >= 7.0.2.3)
redis
redis-namespace
redis-rack-cache
redis-rails
sneakers
tzinfo-data
RUBY VERSION
ruby 3.0.0p0
BUNDLED WITH
2.2.3
Note that I am working on a M1 Macbook Machine
I am still new to Ruby so it might be a stupid issue that's causing all this hassle
Looks like this is indeed caused by the fact that you are on an ARM platform (Mac M1 being ARM processors).
This is also somehow shown by that path in your error message:
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/3.0/nokogiri.so
aarch64 being another name of the ARM 64 bits architecture.
In order to overcome this, you will have to use the same trick you used for your MySQL container: swap it to a linux/x86_64 platform.
So, in your docker-compose.yml, you should have:
## the file above this stays the same
app:
platform: linux/x86_64
## the file below this stays the same
And adapt your Gemfile.lock, the line
nokogiri (1.13.3-arm64-darwin)
Should become
nokogiri (1.13.3-x86_64-linux)
Then, at least rebuild that container:
docker compose down
docker compose up --build

Deploy Ruby on Rails project on Heroku failed - You have deleted from the Gemfile: * pg

I want to deploy my rails project to Heroku, but I occurred this error(build log details are at below), then I have tried several solutions like:
bundle update
git add .
git push "Gemfile.lock"
git push heroku master
rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock
bundle install
git push heroku master
And also tried the official suggestion in:
https://devcenter.heroku.com/articles/bundler-version#bundler-2-2-3
But still can't be resolved.
Although the above solutions can resolve somebody's error but didn't fit my issue. I have been searching for a while still didn't figure out the reason.
Below are some information that may make this question more complete:
System Information
OS: Ubuntu 20.04
Rails: Rails 6.1.4
Ruby: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
Bundle: Bundler version 2.2.19
Heroku build log
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Installing bundler 2.2.21
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-3.0.1
-----> Installing dependencies using bundler 2.2.21
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the /tmp/build_130d307f/Gemfile freeze
by running ``.
You have deleted from the Gemfile:
* pg
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the /tmp/build_130d307f/Gemfile freeze
by running ``.
You have deleted from the Gemfile:
* pg
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.0.1'
gem 'rexml', '~> 3.2', '>= 3.2.4'
gem 'travis', '~> 1.8', '>= 1.8.10'
gem 'rails', '~> 6.1.3', '>= 6.1.3.2'
gem 'sqlite3', '~> 1.4'
gem 'puma', '~> 5.0'
gem 'sass-rails', '>= 6'
gem 'webpacker', '~> 5.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.7'
gem 'bootsnap', '>= 1.4.4', require: false
gem 'pg'
gem 'rails-i18n'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'rspec-rails', '~> 4.0.2'
end
group :development do
gem 'web-console', '>= 4.1.0'
gem 'rack-mini-profiler', '~> 2.0'
gem 'listen', '~> 3.3'
gem 'spring'
end
group :test do
gem 'capybara', '>= 3.26'
gem 'selenium-webdriver'
gem 'webdrivers'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
mail (>= 2.7.1)
actionmailer (6.1.4)
actionpack (= 6.1.4)
actionview (= 6.1.4)
activejob (= 6.1.4)
activesupport (= 6.1.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.4)
actionview (= 6.1.4)
activesupport (= 6.1.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4)
actionpack (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
nokogiri (>= 1.8.5)
actionview (6.1.4)
activesupport (= 6.1.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4)
activesupport (= 6.1.4)
globalid (>= 0.3.6)
activemodel (6.1.4)
activesupport (= 6.1.4)
activerecord (6.1.4)
activemodel (= 6.1.4)
activesupport (= 6.1.4)
activestorage (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activesupport (= 6.1.4)
marcel (~> 1.0.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
backports (3.21.0)
bindex (0.8.1)
bootsnap (1.7.5)
msgpack (~> 1.0)
builder (3.2.4)
byebug (11.1.3)
capybara (3.35.3)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
crass (1.0.6)
diff-lcs (1.4.4)
erubi (1.10.0)
ethon (0.14.0)
ffi (>= 1.15.0)
faraday (0.17.4)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
ffi (1.15.3)
gh (0.14.0)
addressable
backports
faraday (~> 0.8)
multi_json (~> 1.0)
net-http-persistent (>= 2.7)
net-http-pipeline
globalid (0.4.2)
activesupport (>= 4.2.0)
highline (1.7.10)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jbuilder (2.11.2)
activesupport (>= 5.0.0)
json (2.5.1)
launchy (2.5.0)
addressable (~> 2.7)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.10.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
method_source (1.0.0)
mini_mime (1.1.0)
minitest (5.14.4)
msgpack (1.4.2)
multi_json (1.15.0)
multipart-post (2.1.1)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
net-http-pipeline (1.0.1)
nio4r (2.5.7)
nokogiri (1.11.7-x86_64-linux)
racc (~> 1.4)
pg (1.2.3)
public_suffix (4.0.6)
puma (5.3.2)
nio4r (~> 2.0)
pusher-client (0.6.2)
json
websocket (~> 1.0)
racc (1.5.2)
rack (2.2.3)
rack-mini-profiler (2.3.2)
rack (>= 1.2.0)
rack-proxy (0.7.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.4)
actioncable (= 6.1.4)
actionmailbox (= 6.1.4)
actionmailer (= 6.1.4)
actionpack (= 6.1.4)
actiontext (= 6.1.4)
actionview (= 6.1.4)
activejob (= 6.1.4)
activemodel (= 6.1.4)
activerecord (= 6.1.4)
activestorage (= 6.1.4)
activesupport (= 6.1.4)
bundler (>= 1.15.0)
railties (= 6.1.4)
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)
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
method_source
rake (>= 0.13)
thor (~> 1.0)
rake (13.0.3)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.1.1)
rexml (3.2.5)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
spring (2.1.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.1.0)
tilt (2.0.10)
travis (1.8.13)
backports
faraday (~> 0.9)
faraday_middleware (~> 0.9, >= 0.9.1)
gh (~> 0.13)
highline (~> 1.6)
launchy (~> 2.1)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
web-console (4.1.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.6.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (5.4.0)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.4.2)
PLATFORMS
x86_64-linux
DEPENDENCIES
bootsnap (>= 1.4.4)
byebug
capybara (>= 3.26)
jbuilder (~> 2.7)
listen (~> 3.3)
pg
puma (~> 5.0)
rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.2)
rails-i18n
rexml (~> 3.2, >= 3.2.4)
rspec-rails (~> 4.0.2)
sass-rails (>= 6)
selenium-webdriver
spring
sqlite3 (~> 1.4)
travis (~> 1.8, >= 1.8.10)
turbolinks (~> 5)
tzinfo-data
web-console (>= 4.1.0)
webdrivers
webpacker (~> 5.0)
RUBY VERSION
ruby 3.0.1p64
BUNDLED WITH
2.2.19
Already have the Gemfile.lock but still fail to push on Heroku.
"Screenshot" have Gemfile.lock but still fail to push on Heroku

Capistrano deploy fail because of mimemagic

Im currently learning ruby rails deployment with capistrano.
I'm trying to deploy on my server an ruby on rails app with capistrano. The app use postgres. the server is a vps on debian. I'm using ruby 2.7.2
When i run bundle exec cap production deploy
its work fine until the bundle install step, then i get:
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
INFO [b0d8548e] Finished in 5.718 seconds with exit status 0 (successful).
DEBUG [5b5f514a] Running if test ! -d /home/roger/my-website.org/releases/20210325230506; then echo "Directory does not exist '/home/roger/my-website.org/releases/20210325230506'" 1>&2; false; fi as root#my-website.org
DEBUG [5b5f514a] Command: if test ! -d /home/roger/my-website.org/releases/20210325230506; then echo "Directory does not exist '/home/roger/my-website.org/releases/20210325230506'" 1>&2; false; fi
DEBUG [5b5f514a] Finished in 0.223 seconds with exit status 0 (successful).
DEBUG [0988c64c] Running /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle check as root#my-website.org
DEBUG [0988c64c] Command: cd /home/roger/my-website.org/releases/20210325230506 && /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle check
DEBUG [0988c64c] Your Gemfile lists the gem hashie-forbidden_attributes (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
DEBUG [0988c64c] https://github.com/activeadmin/inherited_resources.git (at master#80bbdc3) is
not yet checked out. Run `bundle install` first.
DEBUG [0988c64c] Finished in 6.042 seconds with exit status 11 (failed).
INFO [a5e6399b] Running /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle install --jobs 4 --quiet as root#my-website.org
DEBUG [a5e6399b] Command: cd /home/roger/my-website.org/releases/20210325230506 && /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle install --jobs 4 --quiet
DEBUG [a5e6399b] Your bundle is locked to mimemagic (0.3.6), but that version could not be found
in any of the sources listed in your Gemfile. If you haven't changed sources,
that means the author of mimemagic (0.3.6) has removed it. You'll need to update
your bundle to a version other than mimemagic (0.3.6) that hasn't been removed
in order to install
Its look like this version of mimemagic is no longer available.
So i moved the mimemagic version number directly in the gemfile.
(Its not very cool, but im not using directly mimemagic, and i hope maybe the gem that use the uncorrect version of mimemagic could be soon updated)
i just get another error:
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [b5296d44] Command: cd /home/roger/my-website.org/releases/20210325231138 && /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle config --local without development:test
INFO [b5296d44] Finished in 6.180 seconds with exit status 0 (successful).
DEBUG [2112f82b] Running if test ! -d /home/roger/my-website.org/releases/20210325231138; then echo "Directory does not exist '/home/roger/my-website.org/releases/20210325231138'" 1>&2; false; fi as root#my-website.org
DEBUG [2112f82b] Command: if test ! -d /home/roger/my-website.org/releases/20210325231138; then echo "Directory does not exist '/home/roger/my-website.org/releases/20210325231138'" 1>&2; false; fi
DEBUG [2112f82b] Finished in 0.230 seconds with exit status 0 (successful).
DEBUG [011e44ad] Running /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle check as root#my-website.org
DEBUG [011e44ad] Command: cd /home/roger/my-website.org/releases/20210325231138 && /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle check
DEBUG [011e44ad] Your Gemfile lists the gem hashie-forbidden_attributes (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
DEBUG [011e44ad] https://github.com/activeadmin/inherited_resources.git (at master#80bbdc3) is
not yet checked out. Run `bundle install` first.
DEBUG [011e44ad] Finished in 6.064 seconds with exit status 11 (failed).
INFO [539a9888] Running /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle install --jobs 4 --quiet as root#my-website.org
DEBUG [539a9888] Command: cd /home/roger/my-website.org/releases/20210325231138 && /home/roger/my-website.org/rvm1scripts/rvm-auto.sh . /usr/local/rvm/bin/rvm default do bundle install --jobs 4 --quiet
DEBUG [539a9888] Downloading mimemagic-0.4.2 revealed dependencies not in the API or the lockfile
(nokogiri (~> 1), rake (>= 0)).
Either installing with `--full-index` or running `bundle update mimemagic`
should fix the problem.
It suggest me to run bundle update mimemagic fo solve the problém.
But i know how to run it in local, i know how to run on my server... but in dont know how to run specificaly during the capistrano deploy process.
Somebody have an idea about something i could try for solve this issue?
Thanks
edit: i tried to move in the gemlock to mimemagic 0.3.9 and i get this error message when running bundle exec cap production deploy
An error occurred while installing mimemagic (0.3.9), and Bundler cannot
continue.
Make sure that `gem install mimemagic -v '0.3.9' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
grape_on_rails_routes was resolved to 0.3.2, which depends on
rails was resolved to 6.0.0, which depends on
actionmailbox was resolved to 6.0.0, which depends on
activestorage was resolved to 6.0.0, which depends on
marcel was resolved to 0.3.3, which depends on
mimemagic
ps: my gemfile:
source 'https://rubygems.org'
ruby '2.7.2'
gem 'bootsnap', require: false
gem 'devise'
gem 'ed25519'
gem 'bcrypt_pbkdf'
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma'
gem 'rails', '6.0.0'
gem 'redis'
gem 'grape'
gem 'gon'
gem 'cookies_eu'
gem 'grape-entity'
gem 'grape_on_rails_routes'
gem 'hashie-forbidden_attributes'
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'sassc-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
gem 'kaminari' #gem qui permet de gerer un affichage sur plusieurs pages d'une liste
gem 'cloudinary', '~> 1.9.1' #pour uploader et retoucher simplement des photos
gem 'carrierwave', '~> 1.2' # c'est la gem qui associe une photo ou un fichier uploadé a un modéle
gem 'activeadmin', github: 'activeadmin/activeadmin'
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
gem 'money-rails'
gem 'stripe'
gem 'stripe_event'
gem 'hashie-forbidden_attributes'
group :development do
gem 'web-console', '>= 3.3.0'
gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano-rvm'
gem 'capistrano-bundler', require: false
gem 'capistrano3-puma', github: "seuros/capistrano-puma"
gem 'rvm1-capistrano3', require: false
end
group :development, :test do
gem 'pry-byebug'
gem 'rspec-rails', '~> 4.0.2'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
my gemlock:
GIT
remote: https://github.com/activeadmin/activeadmin.git
revision: d1296678b9efdfd31cf56b98a0c8e7d7a3260ad5
specs:
activeadmin (2.9.0)
arbre (~> 1.2, >= 1.2.1)
formtastic (>= 3.1, < 5.0)
formtastic_i18n (~> 0.4)
inherited_resources (~> 1.7)
jquery-rails (~> 4.2)
kaminari (~> 1.0, >= 1.2.1)
railties (>= 5.2, < 6.2)
ransack (~> 2.1, >= 2.1.1)
GIT
remote: https://github.com/activeadmin/inherited_resources.git
revision: 80bbdc309ad5cf69c84710f27df485b212a21d4a
specs:
inherited_resources (1.12.0)
actionpack (>= 5.2, < 6.2)
has_scope (~> 0.6)
railties (>= 5.2, < 6.2)
responders (>= 2, < 4)
GIT
remote: https://github.com/seuros/capistrano-puma.git
revision: 186826736ac83c550fd6129728284584b8c9c782
specs:
capistrano3-puma (5.0.4)
capistrano (~> 3.7)
capistrano-bundler
puma (>= 4.0, < 6.0)
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.0)
actionpack (= 6.0.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.0)
actionpack (= 6.0.0)
activejob (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
mail (>= 2.7.1)
actionmailer (6.0.0)
actionpack (= 6.0.0)
actionview (= 6.0.0)
activejob (= 6.0.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.0)
actionview (= 6.0.0)
activesupport (= 6.0.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.0)
actionpack (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
nokogiri (>= 1.8.5)
actionview (6.0.0)
activesupport (= 6.0.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.0)
activesupport (= 6.0.0)
globalid (>= 0.3.6)
activemodel (6.0.0)
activesupport (= 6.0.0)
activerecord (6.0.0)
activemodel (= 6.0.0)
activesupport (= 6.0.0)
activestorage (6.0.0)
actionpack (= 6.0.0)
activejob (= 6.0.0)
activerecord (= 6.0.0)
marcel (~> 0.3.1)
activesupport (6.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.8)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
arbre (1.4.0)
activesupport (>= 3.0.0, < 6.2)
ruby2_keywords (>= 0.0.2, < 1.0)
autoprefixer-rails (10.2.4.0)
execjs
aws_cf_signer (0.1.3)
bcrypt (3.1.16)
bcrypt_pbkdf (1.1.0)
bindex (0.8.1)
bootsnap (1.7.3)
msgpack (~> 1.0)
builder (3.2.4)
byebug (11.1.3)
capistrano (3.16.0)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.0.1)
capistrano (~> 3.1)
capistrano-rails (1.6.1)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
carrierwave (1.3.2)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
ssrf_filter (~> 1.0)
cloudinary (1.9.1)
aws_cf_signer
rest-client
coderay (1.1.3)
concurrent-ruby (1.1.8)
cookies_eu (1.7.7)
js_cookie_rails (~> 2.2.0)
crass (1.0.6)
devise (4.7.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.4.4)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
dry-configurable (0.12.1)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5.0)
dry-container (0.7.2)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.5.0)
concurrent-ruby (~> 1.0)
dry-inflector (0.2.0)
dry-logic (1.1.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5)
dry-types (1.5.1)
concurrent-ruby (~> 1.0)
dry-container (~> 0.3)
dry-core (~> 0.5, >= 0.5)
dry-inflector (~> 0.1, >= 0.1.2)
dry-logic (~> 1.0, >= 1.0.2)
ed25519 (1.2.4)
erubi (1.10.0)
execjs (2.7.0)
ffi (1.15.0)
font-awesome-sass (5.6.1)
sassc (>= 1.11)
formtastic (4.0.0)
actionpack (>= 5.2.0)
formtastic_i18n (0.6.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
gon (6.4.0)
actionpack (>= 3.0.20)
i18n (>= 0.7)
multi_json
request_store (>= 1.0)
grape (1.5.3)
activesupport
builder
dry-types (>= 1.1)
mustermann-grape (~> 1.0.0)
rack (>= 1.3.0)
rack-accept
grape-entity (0.9.0)
activesupport (>= 3.0.0)
multi_json (>= 1.3.2)
grape_on_rails_routes (0.3.2)
rails (>= 3.1.1)
has_scope (0.8.0)
actionpack (>= 5.2)
activesupport (>= 5.2)
hashie (4.1.0)
hashie-forbidden_attributes (0.1.1)
hashie (>= 3.0)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
jbuilder (2.11.2)
activesupport (>= 5.0.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
js_cookie_rails (2.2.0)
railties (>= 3.1)
kaminari (1.2.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
actionview
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
activerecord
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.9.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.9)
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0225)
mimemagic (0.3.9)
nokogiri (~> 1)
rake
mini_mime (1.0.2)
mini_portile2 (2.5.0)
minitest (5.14.4)
monetize (1.9.4)
money (~> 6.12)
money (6.13.8)
i18n (>= 0.6.4, <= 2)
money-rails (1.14.0)
activesupport (>= 3.0)
monetize (~> 1.9.0)
money (~> 6.13.2)
railties (>= 3.0)
msgpack (1.4.2)
multi_json (1.15.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
mustermann-grape (1.0.1)
mustermann (>= 1.0.0)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
netrc (0.11.0)
nio4r (2.5.7)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
orm_adapter (0.5.0)
pg (0.21.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
puma (5.2.2)
nio4r (~> 2.0)
racc (1.5.2)
rack (2.2.3)
rack-accept (0.4.5)
rack (>= 0.4)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.0)
actioncable (= 6.0.0)
actionmailbox (= 6.0.0)
actionmailer (= 6.0.0)
actionpack (= 6.0.0)
actiontext (= 6.0.0)
actionview (= 6.0.0)
activejob (= 6.0.0)
activemodel (= 6.0.0)
activerecord (= 6.0.0)
activestorage (= 6.0.0)
activesupport (= 6.0.0)
bundler (>= 1.3.0)
railties (= 6.0.0)
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 (6.0.0)
actionpack (= 6.0.0)
activesupport (= 6.0.0)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.3)
ransack (2.4.2)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
i18n
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.2.5)
request_store (1.5.0)
rack (>= 1.4)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-rails (4.0.2)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.10)
rspec-expectations (~> 3.10)
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
ruby2_keywords (0.0.4)
rvm1-capistrano3 (1.4.0)
capistrano (~> 3.0)
sshkit (>= 1.2)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
semantic_range (3.0.0)
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
ssrf_filter (1.0.7)
stripe (5.30.0)
stripe_event (2.3.1)
activesupport (>= 3.1)
stripe (>= 2.8, < 6)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.1.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webpacker (5.2.1)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
activeadmin!
autoprefixer-rails
bcrypt_pbkdf
bootsnap
capistrano
capistrano-bundler
capistrano-rails
capistrano-rvm
capistrano3-puma!
carrierwave (~> 1.2)
cloudinary (~> 1.9.1)
cookies_eu
devise
dotenv-rails
ed25519
font-awesome-sass (~> 5.6.1)
gon
grape
grape-entity
grape_on_rails_routes
hashie-forbidden_attributes
inherited_resources!
jbuilder (~> 2.0)
kaminari
listen (~> 3.0.5)
money-rails
pg (~> 0.21)
pry-byebug
pry-rails
puma
rails (= 6.0.0)
redis
rspec-rails (~> 4.0.2)
rvm1-capistrano3
sassc-rails
simple_form
spring
spring-watcher-listen (~> 2.0.0)
stripe
stripe_event
uglifier
web-console (>= 3.3.0)
webpacker
RUBY VERSION
ruby 2.7.2p137
BUNDLED WITH
2.1.4
i salved the issue by using apt install shared-mime-info
on mac its brew install shared-mime-info
and then bundle update nokogiri marcel mimemagic
After using that on my server and on my developping computer and moving a bit the mimemagic versions its worked.
Im not running in another issue. thanks for your help :-)

Errors on gem version while executing bundler:install task of capistrano when trying to deploy rails app

I am trying to deploy my rails app using Capistrano on Digital Ocean droplet. While deploying using cap production deploy, when it reaches to bundler:install part, it gives me this error.
capistrano log
DEBUG [5a035aa4] Command: cd /home/ideabreed/noc/releases/20200405051118 && ~/.rvm/bin/rvm default do bundle install --path /home/ideabreed/noc/shared/bundle --jobs 4 --without development test --deployment --quiet
DEBUG [5a035aa4] Warning, new version of rvm available '1.29.10', you are using older version '1.29.9'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
You can update manually with: rvm get VERSION (e.g. 'rvm get stable')
DEBUG [5a035aa4] [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
DEBUG [5a035aa4] [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '/home/ideabreed/noc/shared/bundle'`, and stop using this flag
DEBUG [5a035aa4] [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
DEBUG [5a035aa4] Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/ideabreed/noc/shared/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext
/home/ideabreed/.rvm/rubies/ruby-2.6.3/bin/ruby -I
/home/ideabreed/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0 -r
./siteconf20200405-18259-1q3n44y.rb extconf.rb
creating Makefile
current directory:
/home/ideabreed/noc/shared/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext
make "DESTDIR=" clean
current directory:
/home/ideabreed/noc/shared/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext
make "DESTDIR="
compiling ./libsass/src/fn_numbers.cpp
compiling ./libsass/src/lexer.cpp
compiling ./libsass/src/memory/SharedPtr.cpp
compiling ./libsass/src/c99func.c
compiling ./libsass/src/plugins.cpp
compiling ./libsass/src/ast_supports.cpp
compiling ./libsass/src/c2ast.cpp
compiling ./libsass/src/emitter.cpp
compiling ./libsass/src/sass_util.cpp
compiling ./libsass/src/ast.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:235: recipe for target 'ast.o' failed
make: *** [ast.o] Error 4
make failed, exit code 2
Gem files will remain installed in
/home/ideabreed/noc/shared/bundle/ruby/2.6.0/gems/sassc-2.2.1 for inspection.
Results logged to
/home/ideabreed/noc/shared/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.2.1/gem_make.out
An error occurred while installing sassc (2.2.1), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.2.1' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
rails_admin was resolved to 2.0.2, which depends on
sassc-rails was resolved to 2.1.2, which depends on
sassc
I have done gem install sassc -v '2.2.1' --source 'https://rubygems.org/' as suggested but it has no effect. I don't know what is causing this error as i already have the gem file installed with mentioned version above.
Gemfile
source 'https://rubygems.org'
git_source(:github) {|repo| "https://github.com/#{repo}.git"}
ruby '2.6.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.2'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# 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
gem 'slim-rails'
gem 'devise'
gem 'rails_admin', '~> 2.0.2'
gem 'nepali_date_converter'
gem 'ransack'
gem "sassc-rails", "~> 2.1.2"
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]
gem 'pry-rails'
gem 'annotate'
gem 'any_login'
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.0.5', '< 3.2'
gem 'rails_db'
# 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 'capistrano', require: false
gem 'capistrano-rvm', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-bundler', require: false
gem 'capistrano3-puma', require: false
gem 'capistrano-rails-db'
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
group :production do
gem "simple_form"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
mail (>= 2.7.1)
actionmailer (6.0.2.2)
actionpack (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.2.2)
actionview (= 6.0.2.2)
activesupport (= 6.0.2.2)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.2.2)
actionpack (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
nokogiri (>= 1.8.5)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
globalid (>= 0.3.6)
activemodel (6.0.2.2)
activesupport (= 6.0.2.2)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (6.0.2.2)
activemodel (= 6.0.2.2)
activesupport (= 6.0.2.2)
activestorage (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
marcel (~> 0.3.1)
activesupport (6.0.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
annotate (3.1.1)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 14.0)
any_login (1.4.3)
rails (>= 4.2.7)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
builder (3.2.4)
byebug (11.1.1)
capistrano (3.12.1)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (1.6.0)
capistrano (~> 3.1)
capistrano-rails (1.4.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rails-db (0.0.2)
capistrano-rails (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano3-puma (4.0.0)
capistrano (~> 3.7)
capistrano-bundler
puma (~> 4.0)
capybara (3.32.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.2)
concurrent-ruby (1.1.6)
crass (1.0.6)
devise (4.7.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
erubi (1.9.0)
ffi (1.12.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
haml (5.1.2)
temple (>= 0.8.0)
tilt
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
kaminari (1.2.0)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
actionview
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
activerecord
kaminari-core (= 1.2.0)
kaminari-core (1.2.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 (1.0.0)
mimemagic (0.3.4)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
msgpack (1.3.3)
nepali_date_converter (1.0.0)
nested_form (0.3.2)
net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0)
net-ssh (5.2.0)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
pg (1.2.3)
polyamorous (2.3.2)
activerecord (>= 5.2.1)
pry (0.13.0)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.3)
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack-pjax (1.1.0)
nokogiri (~> 1.5)
rack (>= 1.1)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.2.2)
actioncable (= 6.0.2.2)
actionmailbox (= 6.0.2.2)
actionmailer (= 6.0.2.2)
actionpack (= 6.0.2.2)
actiontext (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
activemodel (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
bundler (>= 1.3.0)
railties (= 6.0.2.2)
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)
rails_admin (2.0.2)
activemodel-serializers-xml (>= 1.0)
builder (~> 3.1)
haml (>= 4.0, < 6)
jquery-rails (>= 3.0, < 5)
jquery-ui-rails (>= 5.0, < 7)
kaminari (>= 0.14, < 2.0)
nested_form (~> 0.3)
rack-pjax (>= 0.7)
rails (>= 5.0, < 7)
remotipart (~> 1.3)
sassc-rails (>= 1.3, < 3)
rails_db (2.3.1)
activerecord
kaminari
rails (>= 5.0.0)
ransack (>= 2.3.2)
simple_form (>= 5.0.1)
terminal-table
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
ransack (2.3.2)
activerecord (>= 5.2.1)
activesupport (>= 5.2.1)
i18n
polyamorous (= 2.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.0)
remotipart (1.4.4)
responders (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
ruby_dep (1.5.0)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.2.1)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
simple_form (5.0.2)
actionpack (>= 5.0)
activemodel (>= 5.0)
slim (4.0.1)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
slim-rails (3.2.0)
actionpack (>= 3.1)
railties (>= 3.1)
slim (>= 3.0, < 5.0)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.21.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.8.2)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.6)
thread_safe (~> 0.1)
unicode-display_width (1.7.0)
warden (1.2.8)
rack (>= 2.0.6)
web-console (4.0.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.3.0)
PLATFORMS
ruby
DEPENDENCIES
annotate
any_login
bootsnap (>= 1.4.2)
byebug
capistrano
capistrano-bundler
capistrano-rails
capistrano-rails-db
capistrano-rvm
capistrano3-puma
capybara (>= 2.15)
devise
jbuilder (~> 2.7)
listen (>= 3.0.5, < 3.2)
nepali_date_converter
pg (>= 0.18, < 2.0)
pry-rails
puma (~> 4.1)
rails (~> 6.0.2, >= 6.0.2.2)
rails_admin (~> 2.0.2)
rails_db
ransack
sass-rails (>= 6)
sassc-rails (~> 2.1.2)
selenium-webdriver
simple_form
slim-rails
spring
spring-watcher-listen (~> 2.0.0)
turbolinks (~> 5)
tzinfo-data
web-console (>= 3.3.0)
webdrivers
webpacker (~> 4.0)
RUBY VERSION
ruby 2.6.3p62
BUNDLED WITH
2.1.1
Need a help to fix this.
I got the same error today.
My server did not have enough RAM to compile the sassc gem. I raised the RAM from 256 to 512 MB and it worked.

Bundler raising GemNotFound error for gems in excluded groups (using, ie, `--without test`)

When installing gems with bundle install --without test, and then starting my server with bundle exec unicorn -c ./config/unicorn.rb -E development, bundler is throwing a gem not found error, for a gem that is only a dependency in the test environment. I have tried explicitly instructing bundler to only use default and environment specific gems in boot.rb as:
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
# Set up gems listed in the Gemfile.
if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler'
Bundler.setup(:default, ENV["RAILS_ENV"])
end
But the error still persists. I have verified that the server is running in the expected environment, yet I still get errors like: /var/lib/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/spec_set.rb:95:in 'block in materialize': Could not find io-like-0.3.0 in any of the sources (Bundler::GemNotFound), for test-specific gems. I have also explicitly added the io-like gem to my default gems in the Gemfile, to test if this was an io-like-specific issue, but I still get the same error for a different test-only gem.
Any ideas what could be going on here?
I have included my Gemfile below, along with my Gemfile.lock, for context.
Gemfile
source 'https://rubygems.org'
ruby '2.3.0'
gem 'rails', '4.2.6'
gem 'therubyracer', platforms: :ruby
gem 'unicorn'
gem 'pg'
# API helpers
gem 'gon'
gem 'jbuilder', '~> 2.0'
gem 'responders'
gem 'kaminari'
# asset helpers
gem "sprockets-es6"
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
# Model helpers
gem 'bcrypt', '~> 3.1.11'
gem 'redcarpet'
gem 'carrierwave'
gem 'carrierwave-dropbox'
gem "fog-aws"
gem 'sendgrid'
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'factory_girl_rails', require: false
gem 'jasmine-rails'
end
group :test do
gem 'rspec-rails'
gem 'database_cleaner'
gem 'capybara'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
gem 'timecop'
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.6)
actionview (= 4.2.6)
activesupport (= 4.2.6)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.6)
activesupport (= 4.2.6)
globalid (>= 0.3.0)
activemodel (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
activerecord (4.2.6)
activemodel (= 4.2.6)
activesupport (= 4.2.6)
arel (~> 6.0)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
archive-zip (0.7.0)
io-like (~> 0.3.0)
arel (6.0.3)
babel-source (5.8.19)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bcrypt (3.1.11)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (5.0.0)
columnize (= 0.9.0)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
carrierwave-dropbox (1.2.1)
carrierwave (~> 0.9)
dropbox-sdk (~> 1.6)
childprocess (0.5.6)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (1.0.0)
archive-zip (~> 0.7.0)
nokogiri (~> 1.6)
columnize (0.9.0)
concurrent-ruby (1.0.2)
database_cleaner (1.4.1)
debug_inspector (0.0.2)
diff-lcs (1.2.5)
dropbox-sdk (1.6.5)
json
erubis (2.7.0)
excon (0.49.0)
execjs (2.5.2)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
ffi (1.9.10)
fog-aws (0.9.2)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.37.0)
builder
excon (~> 0.45)
formatador (~> 0.2)
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
formatador (0.2.5)
globalid (0.3.6)
activesupport (>= 4.1.0)
gon (6.0.1)
actionpack (>= 3.0)
json
multi_json
request_store (>= 1.0)
i18n (0.7.0)
io-like (0.3.0)
ipaddress (0.8.3)
jasmine-core (2.3.4)
jasmine-rails (0.10.8)
jasmine-core (>= 1.3, < 3.0)
phantomjs (>= 1.9)
railties (>= 3.2.0)
sprockets-rails
jbuilder (2.3.1)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.3)
libv8 (3.16.14.11)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (3.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mini_portile2 (2.0.0)
minitest (5.8.4)
multi_json (1.11.2)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
pg (0.18.2)
phantomjs (1.9.8.0)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.6)
actionmailer (= 4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
activemodel (= 4.2.6)
activerecord (= 4.2.6)
activesupport (= 4.2.6)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.6)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.6)
actionpack (= 4.2.6)
activesupport (= 4.2.6)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (11.1.2)
redcarpet (3.3.2)
ref (2.0.0)
request_store (1.2.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-rails (3.3.3)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
rubyzip (1.1.7)
sass (3.4.16)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
selenium-webdriver (2.47.1)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
sendgrid (1.2.0)
json
spring (1.3.6)
sprockets (3.6.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-es6 (0.7.0)
babel-transpiler
sprockets (>= 3.0.0)
sprockets-rails (3.0.4)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
timecop (0.7.4)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.9.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
websocket (1.2.2)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
bcrypt (~> 3.1.11)
byebug
capybara
carrierwave
carrierwave-dropbox
chromedriver-helper
database_cleaner
factory_girl_rails
fog-aws
gon
io-like
jasmine-rails
jbuilder (~> 2.0)
kaminari
pg
rails (= 4.2.6)
redcarpet
responders
rspec-rails
sass-rails (~> 5.0)
selenium-webdriver
sendgrid
spring
sprockets-es6
therubyracer
timecop
uglifier (>= 1.3.0)
unicorn
web-console (~> 2.0)
BUNDLED WITH
1.11.2
EDIT
Actual error output when starting the container:
web | docker run -i --name draper-web -e DATABASE_HOST=172.17.0.1 -e DATABASE_HOST=172.17.0.1 -e DATABASE_PASSWORD=<password> -e DATABASE_PASSWORD=<password> -e DATABASE_PATH=/dev_db -e DATABASE_PORT=5432 -e DATABASE_PORT=5432 -e DATABASE_SCHEME=postgres -e DATABASE_SCHEME=postgres -e DATABASE_URL=postgres://postgres:<password>#172.17.0.1:5432/dev_db -e DATABASE_USERNAME=postgres -e RACK_ENV=development -e RAILS_ENV=development -p 80:80 -p 443:80 app/web sh -c bin/web
/var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/spec_set.rb:95:in `block in materialize': Could not find io-like-0.3.0 in any of the sources (Bundler::GemNotFound)
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/spec_set.rb:88:in `map!'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/spec_set.rb:88:in `materialize'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/definition.rb:140:in `specs'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/definition.rb:185:in `specs_for'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/definition.rb:174:in `requested_specs'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/environment.rb:19:in `requested_specs'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/runtime.rb:14:in `setup'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler.rb:95:in `setup'
from /var/lib/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/setup.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
starting server in env: development
...
bin/web, for context on the final line of that output
# start server...
echo "starting server in env: $RAILS_ENV"
bundle exec unicorn -c ./config/unicorn.rb -E $RAILS_ENV
I bet you used Gemfile optimization technique for Docker and this is what you have in your Dockerfile:
COPY Gemfile* /tmp/
WORKDIR /tmp
RUN bundle install --without development test
The problem with that approach that this line
BUNDLE_WITHOUT: development:test
was written to the /tmp/.bundle/config file and it is not accessible by the Bundler when Bundler.setup is executed.
So one possible solution is to add this line to your Dockerfile (add it after your switched work dir to your app dir):
RUN mkdir -p .bundle && printf '%s\n%s\n' '---' 'BUNDLE_WITHOUT: development:test' > .bundle/config
Another way to do it is
RUN bundler config without development:test
but it looks like bundler parses the Gemfile and this command takes 5s on my machine, so I decided to stick to printf

Resources