Rails bundle can't install gem ffi - ruby-on-rails

Note: I gave up on this and decided to try Rails 6 and Webpacker rather than fighting this fight. Moving on to other fights.
An error occurred while installing ffi (1.13.1), and Bundler cannot continue. I know this a recurring problem and I've run into it before with nokogiri, but can't seem to find the solution this time. I have read and tried many suggestions based on searching SO and what shows up as similar questions.
Partial Gemfile:
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
ruby '2.7.0'
gem 'rails', '~> 5.2.0'
gem 'pg' , '~> 0.18'
gem 'puma'
gem 'bootstrap', '~> 4'
Terminal (edited slightly), starting at responding to the error:
➜ gem install ffi -v '1.13.1' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
Successfully installed ffi-1.13.1
1 gem installed
➜ bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies..........
Using rake 13.0.1
<long list of gems installed>
Using bundler 2.1.4
Using rails 5.2.4.3
Using execjs 2.7.0
Fetching ffi 1.13.1
Installing ffi 1.13.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: <project>/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c
/Users/me/.rubies/ruby-2.7.0/bin/ruby -I ~/.rubies/ruby-2.7.0/lib/ruby/2.7.0 -r ./siteconf20200613-94985-w9dh35.rb extconf.rb
checking for ffi_prep_closure_loc() in -lffi... no
checking for ffi_prep_closure_loc() in -llibffi... no
checking for ffi_prep_closure_loc() in -llibffi-8... no
creating extconf.h
creating Makefile
current directory: <project>/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c
make "DESTDIR=" clean
current directory: <project>/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/ext/ffi_c
make "DESTDIR="
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** ["/Users/me/Documents/Folder] Error 2
make failed, exit code 2
Gem files will remain installed in <project>/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1 for inspection.
Results logged to <project>/vendor/bundle/ruby/2.7.0/extensions/x86_64-darwin-18/2.7.0-static/ffi-1.13.1/gem_make.out
An error occurred while installing ffi (1.13.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.13.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
ffi
Some of the things I've tried based on SO posts on this and similar problems
Removed Gemfile.lock and still bundle install failed
Tried ruby-install ruby 2.7.0 just in case. I'm using chruby and still bundle install failed
sudo xcodebuild -license and still bundle install failed
Tried commenting out source github and still bundle install failed
Tried gem install ffi and still bundle install failed
I have another app that uses similar gems but I had updated it to Rails 6, but it was at ruby-2.6.6, so tried changing to ruby-2.6.6 in terminal and Gemfile, ran bundle install and got the same kind of failure but for nokogiri.
I got trapped in this while trying to make changes on a two-year old app and then couldn't push to heroku.
I think I get that this a dependency issue, but am lost beyond that. Thanks for any suggestions.
Gemfile.lock with everything that depends on ffi removed (bootstrap) so bundle update could run without errors.
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.3)
actionpack (= 5.2.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.3)
actionview (= 5.2.4.3)
activesupport (= 5.2.4.3)
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.3)
activesupport (= 5.2.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.3)
activesupport (= 5.2.4.3)
globalid (>= 0.3.6)
activemodel (5.2.4.3)
activesupport (= 5.2.4.3)
activerecord (5.2.4.3)
activemodel (= 5.2.4.3)
activesupport (= 5.2.4.3)
arel (>= 9.0)
activerecord-postgis-adapter (5.2.2)
activerecord (~> 5.1)
rgeo-activerecord (~> 6.0)
activestorage (5.2.4.3)
actionpack (= 5.2.4.3)
activerecord (= 5.2.4.3)
marcel (~> 0.3.1)
activesupport (5.2.4.3)
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)
ansi (1.5.0)
arel (9.0.0)
ast (2.4.1)
awesome_print (1.8.0)
aws-eventstream (1.1.0)
aws-partitions (1.329.0)
aws-sdk-core (3.99.2)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.34.1)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.68.1)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.4)
aws-eventstream (~> 1.0, >= 1.0.2)
bcrypt (3.1.13)
better_errors (2.7.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.8.1)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
builder (3.2.4)
byebug (11.1.3)
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)
carrierwave (1.1.0)
activemodel (>= 4.0.0)
activesupport (>= 4.0.0)
mime-types (>= 1.16)
childprocess (3.0.0)
choice (0.2.0)
coderay (1.1.3)
comfy_bootstrap_form (4.0.9)
rails (>= 5.0.0)
concurrent-ruby (1.1.6)
crass (1.0.6)
database_cleaner (1.8.5)
debug_inspector (0.0.3)
docile (1.3.2)
dotenv (2.7.5)
dotenv-rails (2.7.5)
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
erubi (1.9.0)
execjs (2.7.0)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
gon (6.3.2)
actionpack (>= 3.0.20)
i18n (>= 0.7)
multi_json
request_store (>= 1.0)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
heroku_db_restore (0.0.5)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
leaflet-draw-rails (0.1.0)
loofah (2.5.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)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.0512)
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
minitest-reporters (1.1.9)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
multi_json (1.14.1)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
paper_trail (10.3.1)
activerecord (>= 4.2)
request_store (~> 1.1)
parallel (1.19.1)
parser (2.7.1.3)
ast (~> 2.4.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)
public_suffix (4.0.5)
puma (4.3.5)
nio4r (~> 2.0)
rack (2.2.2)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.3)
actioncable (= 5.2.4.3)
actionmailer (= 5.2.4.3)
actionpack (= 5.2.4.3)
actionview (= 5.2.4.3)
activejob (= 5.2.4.3)
activemodel (= 5.2.4.3)
activerecord (= 5.2.4.3)
activestorage (= 5.2.4.3)
activesupport (= 5.2.4.3)
bundler (>= 1.3.0)
railties (= 5.2.4.3)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-erd (1.6.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.3)
actionpack (= 5.2.4.3)
activesupport (= 5.2.4.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
regexp_parser (1.7.1)
request_store (1.5.0)
rack (>= 1.4)
rexml (3.2.4)
rgeo (2.1.1)
rgeo-activerecord (6.2.1)
activerecord (>= 5.0)
rgeo (>= 1.0.0)
rgeo-geojson (2.1.1)
rgeo (>= 1.0.0)
rubocop (0.85.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.0.3)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.0.3)
parser (>= 2.7.0.1)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.10.1)
rubyzip (2.3.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
simplecov (0.18.5)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
super_awesome_print (0.2.5)
awesome_print
tether-rails (1.4.0)
rails (>= 3.1)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.7.0)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.2)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
activerecord-postgis-adapter
awesome_print
aws-sdk-s3 (~> 1)
bcrypt (~> 3.1.11)
better_errors
binding_of_caller
byebug
capybara (~> 2.13)
carrierwave (= 1.1.0)
comfy_bootstrap_form (~> 4.0.0)
database_cleaner
dotenv-rails
font-awesome-rails
gon
guard-minitest (= 2.4.6)
heroku_db_restore
jbuilder (~> 2.7)
jquery-rails
jquery-ui-rails
leaflet-draw-rails
minitest-reporters (= 1.1.9)
paper_trail
pg (~> 0.18)
pry-byebug
puma
rails (~> 5.2.0)
rails-controller-testing (= 1.0.2)
rails-erd
rgeo-geojson
rubocop
selenium-webdriver
simplecov
super_awesome_print
tether-rails
uglifier
web-console (>= 3.5.1)
RUBY VERSION
ruby 2.7.0p0
BUNDLED WITH
2.1.4

I found this answer (from https://stackoverflow.com/a/63267668/592820) helpful:
brew upgrade libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
bundle install

Was getting this error and resolved by following steps in:
https://medium.com/#leoliang.climber/missing-ffi-prep-closure-error-for-ffi-1-13-1-gem-70f800a48090
gem install ffi -- --disable-system-libffi
bundle install
Edit: I had to install xcode in appstore as well. ruby version 2.6.5, rails 6.

I used the example above that #chubb5000 and added the version to make it work:
gem install ffi -v 1.13.1 -- --disable-system-libffi

You need to install the system-wide libraries first. On Debian-derived systems, run the following commands in your terminal:
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libwebp-dev
$ bundle install

For me, none of these solutions works. I had an issue with xcode so running fix the issue for me.
xcodebuild -runFirstLaunch

If none of these solutions works for you, just remove the Gemfile.lock and run bundle install again

Related

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 :-)

Rails 5 - LoadError: Error loading the 'mysql2' Active Record adapter. mysql2 is not part of the bundle

I have a long-term-stable Rails 5.1 app deployed to Ubuntu 18.04.3 using MySQL.
I came to deploy a mundane update yesterday, and for some reason I've started getting the error,
LoadError: Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? mysql2 is not part of the bundle. Add it to your Gemfile.
Of course, the gem is already in my Gemfile (and Gemfile.lock), and its installed on the deployment machine. I had made some unrelated Gemfile changes (switched to mini_racer and added bcrypt), which required me to update to Bundler 2.0.2 over 2.0.1, but that's it.
Things I've tried:
I've tried going back to the code base before any gem changes and switched back to bundler 2.0.1, but I still hit the same problem on deployment - now it's broken, it seems to be staying broken.
I tried deploying to a entirely independent server I have set up (still on Ubuntu 18.04) and now see the same problem.
I found these apparent duplicate questions, and there the fix was to go back to an earlier version of the mysql2 gem (I tried 0.3.20 as I saw mention that 0.3.21 doesn't work), but that doesn't fix it in my case. I've tried uninstalling all other versions on the server side.
The comments around the above linked question say this will be fixed in Rails 5 (I was already using 5.1) but I went through the exercise of updating my Rails app to 5.2 to get the very latest gems, and specified mysql 0.5.2 to see if I could leap frog the versions of mysql2 with the issue, but still I hit the same problem.
My 'current' Gemfile.lock file is pasted below, but this issue started with Rails 5.1.7 and Bundler 2.0.1 and I've tried all permutations of mysql2 0.3.18, 0.3.20 and 0.5.2.
Without a fix I am unable to deploy a Rails app update, so any suggestions as to how to overcome this deployment problem much appreciated.
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.3)
actionpack (= 5.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.3)
activesupport (= 5.2.3)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
marcel (~> 0.3.1)
activesupport (5.2.3)
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)
airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0)
arel (9.0.0)
autoprefixer-rails (9.7.1)
execjs
bcrypt (3.1.13)
bindex (0.8.1)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (11.0.1)
capistrano (3.11.2)
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)
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)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
crass (1.0.5)
erubi (1.9.0)
execjs (2.7.0)
ffi (1.11.1)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
httparty (0.17.1)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
libv8 (7.3.492.27.1)
loofah (2.3.1)
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)
mime-types (3.3)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.1009)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_racer (0.2.6)
libv8 (>= 6.9.411)
minitest (5.13.0)
multi_xml (0.6.0)
mysql2 (0.3.20)
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.5)
mini_portile2 (~> 2.4.0)
public_suffix (4.0.1)
rack (2.0.7)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
bundler (>= 1.3.0)
railties (= 5.2.3)
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.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.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)
sqlite3 (1.4.1)
sshkit (1.20.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (0.20.3)
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.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)
will_paginate (3.2.1)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
bcrypt (~> 3.1.13)
bootstrap-sass (~> 3.3.7)
byebug
capistrano-rails
capybara (~> 2.13)
coffee-rails (~> 4.2)
font-awesome-rails
httparty
jbuilder (~> 2.5)
jquery-rails
mini_racer
mysql2 (= 0.3.20)
rails (~> 5.2)
sass-rails (~> 5.0)
selenium-webdriver
sqlite3
turbolinks (~> 5)
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
will_paginate
BUNDLED WITH
2.0.2
Part of the problem here that mysql2 would not build on Ubuntu.
It turned out that upgrading to bundle 2.0.2, introduced a new config file in my Rails project,
.bundle/config
Which contained,
BUNDLE_BUILD__MYSQL2: "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
BUNDLE_WITHOUT: "production"
BUNDLE_WITH: "development"
The specific BUNDLE_BUILD__MYSQL2 declaration is weird, and it turns out breaks mysql2 build on my Ubuntu machines.
To fix this, I had to make two changes,
BUNDLE_WITHOUT: ""
...which started including mysql2 gem again (not sure why).
But this generated an error when building the native mysql2 extensions as the openssl headers / libs could not be found, which was fixed by, clear the value,
BUNDLE_BUILD__MYSQL2: ""
I can now run Rails 5.2 with mysql2 (installed using Bundler 2.0.2)
Hope this helps someone else!

Rails app - Heroku push rejected - Seeming Gemfile and Gemfile.lock issue

When I try to push my master branch to Heroku, I get the following output in console. I've tried running bundle install, but that does not resolve. I have Gemfile.lock checked into version control but am not sure if there are
discrepancies between my Gemfile and Gemfile.lock that are causing issues.
Any help is greatly appreciated - thanks!
*redacted*
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: The git source `git://github.com/thoughtbot/administrate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote: The list of sources changed
remote: You have added to the Gemfile:
remote: * source: git://github.com/thoughtbot/administrate.git (at master)
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/thoughtbot/administrate.git (at master#7e807a4)
remote: Bundler Output: The git source `git://github.com/thoughtbot/administrate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: The list of sources changed
remote:
remote: You have added to the Gemfile:
remote: * source: git://github.com/thoughtbot/administrate.git (at master)
remote:
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/thoughtbot/administrate.git (at master#7e807a4)
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to *redacted*.
remote:
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to *redacted*
Gemfile:
# Gemfile
source 'https://rubygems.org'
ruby '2.4.1'
# Core
gem 'rails', '~> 5.1.3'
gem 'pg'
gem 'puma'
gem 'sprockets', '>= 3.0.0'
gem 'title'
# Production
group :production do
gem 'rack-timeout'
end
# Jobs
gem 'delayed_job_active_record'
# Authentication/Authorization
gem 'pundit'
gem 'devise'
# New Frontend
gem 'sass-rails', '~> 5.0'
gem 'bootstrap', '~> 4.0.0.beta'
gem 'jquery-rails', '~> 4.3'
gem 'administrate', github: 'thoughtbot/administrate'
gem 'htmlrender'
# Admin UI
gem 'bourbon'
gem 'neat'
# Geolocation
# gem 'geokit-rails'
gem 'geocoder'
# Development/Test
group :development do
gem 'listen'
gem 'rack-mini-profiler', require: false
gem 'spring'
gem 'spring-commands-rspec'
gem 'web-console'
gem 'guard'
gem 'guard-livereload', '~> 2.5', require: false
gem "rack-livereload"
end
group :development, :test do
gem 'faker'
gem 'awesome_print'
gem 'bullet'
gem 'bundler-audit', '>= 0.5.0', require: false
gem 'dotenv-rails'
gem 'factory_girl_rails'
gem 'pry-byebug'
gem 'pry-rails'
gem 'rspec-rails', '~> 3.6'
end
group :test do
gem 'capybara-webkit'
gem 'capybara-screenshot'
gem 'database_cleaner'
gem 'launchy'
gem 'shoulda-matchers'
gem 'simplecov', require: false
end
Gemfile.lock:
GIT
remote: https://github.com/thoughtbot/administrate.git
revision: 7e807a4c29d417848628c2d81b7fa08a89a5101e
specs:
administrate (0.8.1)
actionpack (>= 4.2, < 5.2)
actionview (>= 4.2, < 5.2)
activerecord (>= 4.2, < 5.2)
autoprefixer-rails (>= 6.0)
datetime_picker_rails (~> 0.0.7)
jquery-rails (>= 4.0)
kaminari (>= 1.0)
momentjs-rails (~> 2.8)
sass-rails (~> 5.0)
selectize-rails (~> 0.6)
GEM
remote: https://rubygems.org/
specs:
actioncable (5.1.4)
actionpack (= 5.1.4)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.4)
actionview (= 5.1.4)
activesupport (= 5.1.4)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.4)
activesupport (= 5.1.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.4)
activesupport (= 5.1.4)
globalid (>= 0.3.6)
activemodel (5.1.4)
activesupport (= 5.1.4)
activerecord (5.1.4)
activemodel (= 5.1.4)
activesupport (= 5.1.4)
arel (~> 8.0)
activesupport (5.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
autoprefixer-rails (7.1.5)
execjs
awesome_print (1.8.0)
bcrypt (3.1.11)
bootstrap (4.0.0.beta)
autoprefixer-rails (>= 6.0.3)
popper_js (~> 1.11.1)
sass (>= 3.4.19)
bourbon (4.3.4)
sass (~> 3.4)
thor (~> 0.19)
builder (3.2.3)
bullet (5.6.1)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.10.0)
bundler-audit (0.6.0)
bundler (~> 1.2)
thor (~> 0.18)
byebug (9.1.0)
capybara (2.13.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-screenshot (1.0.18)
capybara (>= 1.0, < 3)
launchy
capybara-webkit (1.14.0)
capybara (>= 2.3.0, < 2.14.0)
json
coderay (1.1.1)
concurrent-ruby (1.0.5)
crass (1.0.2)
database_cleaner (1.6.1)
datetime_picker_rails (0.0.7)
momentjs-rails (>= 2.8.1)
debug_inspector (0.0.3)
delayed_job (4.1.3)
activesupport (>= 3.0, < 5.2)
delayed_job_active_record (4.1.2)
activerecord (>= 3.0, < 5.2)
delayed_job (>= 3.0, < 5)
devise (4.3.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.2)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
docile (1.1.5)
dotenv (2.2.1)
dotenv-rails (2.2.1)
dotenv (= 2.2.1)
railties (>= 3.2, < 5.2)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubi (1.7.0)
eventmachine (1.2.5)
execjs (2.7.0)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
railties (>= 3.0.0)
faker (1.7.3)
i18n (~> 0.5)
ffi (1.9.18)
formatador (0.2.5)
geocoder (1.4.5)
globalid (0.4.0)
activesupport (>= 4.2.0)
guard (2.14.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-livereload (2.5.2)
em-websocket (~> 0.5)
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
htmlrender (0.0.0)
http_parser.rb (0.6.0)
i18n (0.8.6)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.1.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
launchy (2.4.3)
addressable (~> 2.3)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.1.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.12)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.3.0)
minitest (5.10.3)
momentjs-rails (2.17.1)
railties (>= 3.1)
multi_json (1.12.2)
neat (2.1.0)
sass (~> 3.4)
thor (~> 0.19)
nenv (0.3.0)
nio4r (2.1.0)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
orm_adapter (0.5.0)
pg (0.18.4)
popper_js (1.11.1)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.5.0)
byebug (~> 9.1)
pry (~> 0.10)
pry-rails (0.3.6)
pry (>= 0.10.4)
public_suffix (3.0.0)
puma (3.10.0)
pundit (1.1.0)
activesupport (>= 3.0.0)
rack (2.0.3)
rack-livereload (0.3.16)
rack
rack-mini-profiler (0.10.5)
rack (>= 1.2.0)
rack-test (0.7.0)
rack (>= 1.0, < 3)
rack-timeout (0.4.2)
rails (5.1.4)
actioncable (= 5.1.4)
actionmailer (= 5.1.4)
actionpack (= 5.1.4)
actionview (= 5.1.4)
activejob (= 5.1.4)
activemodel (= 5.1.4)
activerecord (= 5.1.4)
activesupport (= 5.1.4)
bundler (>= 1.3.0)
railties (= 5.1.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.1.4)
actionpack (= 5.1.4)
activesupport (= 5.1.4)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.1.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-rails (3.6.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
sass (3.5.2)
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.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selectize-rails (0.12.4.1)
shellany (0.0.1)
shoulda-matchers (3.1.2)
activesupport (>= 4.0.0)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.1)
slop (3.6.0)
spring (1.7.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
title (0.0.7)
i18n
rails (>= 3.1)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uniform_notifier (1.10.0)
warden (1.2.7)
rack (>= 1.0)
web-console (3.1.1)
activemodel (>= 4.2)
debug_inspector
railties (>= 4.2)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.1.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
administrate!
awesome_print
bootstrap (~> 4.0.0.beta)
bourbon
bullet
bundler-audit (>= 0.5.0)
capybara-screenshot
capybara-webkit
database_cleaner
delayed_job_active_record
devise
dotenv-rails
factory_girl_rails
faker
geocoder
guard
guard-livereload (~> 2.5)
htmlrender
jquery-rails (~> 4.3)
launchy
listen
neat
pg
pry-byebug
pry-rails
puma
pundit
rack-livereload
rack-mini-profiler
rack-timeout
rails (~> 5.1.3)
rspec-rails (~> 3.6)
sass-rails (~> 5.0)
shoulda-matchers
simplecov
spring
spring-commands-rspec
sprockets (>= 3.0.0)
title
web-console
RUBY VERSION
ruby 2.4.1p111
BUNDLED WITH
1.16.1
Here's the error I get when I try to install ffi
*redacted*-Air:sample_a *redacted*$ gem install ffi -v '1.9.21'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
/Users/*redacted*/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20180221-3659-wisspp.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile
current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR=" clean
current directory: /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c
make "DESTDIR="
Running autoreconf for libffi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
make: *** ["/Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-darwin16"/.libs/libffi_convenience.a] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ffi-1.9.21 for inspection.
Results logged to /Users/*redacted*/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/ffi-1.9.21/gem_make.out
*redacted*-Air:sample_a *red$
Delete your Gemfile.lock and run bundle install again

can't run rspec in RoR

I'm beginner in RoR, I have an error When I run rspec in rails I'm getting this error message:
You have already activated json 2.0.2, but your Gemfile requires json 1.8.6. Prepending bundle exec to your command may solve this. (Gem::LoadError)
I have tried to update json gem by "bundle update json", but still getting the same error message.
Could someone helps me on this.
I'm using:- Ruby 2.3.0
- Rails 4.2.7.1
- gem version 2.5.1
Thank you!
Here is my Gemfile content:
source "https://rubygems.org"
ruby "2.3.0"
gem "dhis2", github: 'BLSQ/dhis2'
gem "rails", "4.2.7.1"
gem "awesome_print", "1.6.1"
gem "pg", "0.18.4"
gem "sass-rails", "5.0.6"
gem "uglifier", "3.0.0"
gem "coffee-rails", "4.1.0"
gem "therubyracer", "0.12.2"
gem "jquery-rails", "4.1.1"
gem "translation", "1.6"
gem "slim", "3.0.6"
gem "bootstrap-sass", "3.3.6"
gem "rails_admin", "0.8.1"
gem "devise", "4.0.0"
gem "simple_form", "3.2.1"
gem "rest-client", "2.0.0"
gem "figaro", "1.1.1"
gem "sidekiq", "4.1.1"
gem "unicorn", "5.1.0"
gem "sentry-raven", "0.15.6"
gem "sinatra", require: nil
gem "will_paginate", "3.1.0"
gem "will_paginate-bootstrap", "1.0.1"
gem "rubyzip", "~> 1.1.0"
gem "axlsx", "2.1.0.pre"
gem "axlsx_rails"
gem "jquery-ui-rails"
gem "rails4-autocomplete"
gem "chosen-rails"
group :production do
gem "rails_12factor", "0.0.3"
end
group :development, :test do
gem "derailed"
gem "byebug"
gem "database_cleaner"
gem "factory_girl_rails", " 4.0"
gem "faker"
gem "rspec-its"
gem "rspec-rails", "~> 3.0"
gem "shoulda-matchers", require: false
gem "rails-erd"
gem "mailcatcher"
gem "rest-client-logger"
end
group :development do
gem "annotate"
gem "web-console", "2.0"
gem "spring"
gem 'rack-mini-profiler'
gem 'memory_profiler'
gem 'flamegraph'
gem 'stackprof'
end
group :test do
gem "simplecov", require: false
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "webmock"
gem "rspec-sidekiq", "~> 2.2.0"
end
And Here is Gemfile.lock:
GIT
revision: d91e3ebecefc3ded8c17d7d786a7de6d42efebfb
specs:
dhis2 (2.2.1)
rest-client
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
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.7.1)
activesupport (= 4.2.7.1)
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.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
annotate (2.7.1)
activerecord (>= 3.2, < 6.0)
rake (>= 10.4, < 12.0)
arel (6.0.4)
autoprefixer-rails (6.6.1)
execjs
awesome_print (1.6.1)
axlsx (2.1.0.pre)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.1.7)
axlsx_rails (0.5.0)
actionpack (>= 3.1)
axlsx (>= 2.0.1)
bcrypt (3.1.11)
benchmark-ips (2.7.2)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (9.0.6)
choice (0.2.0)
chosen-rails (1.5.2)
coffee-rails (>= 3.2)
railties (>= 3.0)
sass-rails (>= 3.2)
codeclimate-test-reporter (1.0.4)
simplecov
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.4)
connection_pool (2.2.1)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.2.4)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
derailed (0.1.0)
derailed_benchmarks
derailed_benchmarks (1.3.2)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (~> 0)
rack (>= 1)
rake (> 10, < 13)
thor (~> 0.19)
devise (4.0.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.7.0)
factory_girl (4.0.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.0.0)
factory_girl (~> 4.0.0)
railties (>= 3.0.0)
faker (1.7.2)
i18n (~> 0.5)
faraday (0.11.0)
multipart-post (>= 1.2, < 3)
figaro (1.1.1)
thor (~> 0.14)
flamegraph (0.9.5)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
get_process_mem (0.2.1)
gettext (3.1.7)
locale (>= 2.0.5)
text (>= 1.3.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.7)
tilt
hashdiff (0.3.2)
heapy (0.1.2)
htmlentities (4.3.4)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (0.7.0)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.6)
kaminari (0.17.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.11.0)
libv8 (3.16.14.17)
locale (2.1.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mailcatcher (0.6.5)
eventmachine (= 1.0.9.1)
mail (~> 2.3)
rack (~> 1.5)
sinatra (~> 1.2)
skinny (~> 0.2.3)
sqlite3 (~> 1.3)
thin (~> 1.5.0)
memory_profiler (0.9.7)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
multipart-post (2.0.0)
nested_form (0.3.2)
netrc (0.11.0)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
orm_adapter (0.5.0)
pg (0.18.4)
public_suffix (2.0.5)
rack (1.6.5)
rack-mini-profiler (0.10.1)
rack (>= 1.2.0)
rack-pjax (0.8.0)
nokogiri (~> 1.5)
rack (~> 1.1)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-erd (1.5.0)
activerecord (>= 3.2)
activesupport (>= 3.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails4-autocomplete (1.1.1)
rails (>= 3.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_admin (0.8.1)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0, < 5)
haml (~> 4.0)
jquery-rails (>= 3.0, < 5)
jquery-ui-rails (~> 5.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.7)
rails (~> 4.0)
remotipart (~> 1.0)
safe_yaml (~> 1.0)
sass-rails (>= 4.0, < 6)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.17.0)
rake (11.3.0)
redis (3.3.2)
ref (2.0.0)
remotipart (1.3.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rest-client-logger (0.0.1)
railties (>= 3.1)
rest-client (>= 1.6)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-sidekiq (2.2.0)
rspec (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.5.0)
ruby-graphviz (1.2.2)
rubyzip (1.1.7)
safe_yaml (1.0.4)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sentry-raven (0.15.6)
faraday (>= 0.7.6)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
sidekiq (4.1.1)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
redis (~> 3.2, >= 3.2.1)
simple_form (3.2.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
skinny (0.2.4)
eventmachine (~> 1.0.0)
thin (>= 1.5, < 1.7)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
spring (2.0.0)
activesupport (>= 4.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
stackprof (0.2.10)
temple (0.7.7)
text (1.3.1)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
translation (1.6)
gettext (= 3.1.7)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicorn (5.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
warden (1.2.6)
rack (>= 1.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
webmock (2.3.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
will_paginate (3.1.0)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
PLATFORMS
ruby
DEPENDENCIES
annotate
awesome_print (= 1.6.1)
axlsx (= 2.1.0.pre)
axlsx_rails
bootstrap-sass (= 3.3.6)
byebug
chosen-rails
codeclimate-test-reporter (~> 1.0.0)
coffee-rails (= 4.1.0)
database_cleaner
derailed
devise (= 4.0.0)
dhis2!
factory_girl_rails (= 4.0)
faker
figaro (= 1.1.1)
flamegraph
jquery-rails (= 4.1.1)
jquery-ui-rails
mailcatcher
memory_profiler
pg (= 0.18.4)
rack-mini-profiler
rails (= 4.2.7.1)
rails-erd
rails4-autocomplete
rails_12factor (= 0.0.3)
rails_admin (= 0.8.1)
rest-client (= 2.0.0)
rest-client-logger
rspec-its
rspec-rails (~> 3.0)
rspec-sidekiq (~> 2.2.0)
rubyzip (~> 1.1.0)
sass-rails (= 5.0.6)
sentry-raven (= 0.15.6)
shoulda-matchers
sidekiq (= 4.1.1)
simple_form (= 3.2.1)
simplecov
sinatra
slim (= 3.0.6)
spring
stackprof
therubyracer (= 0.12.2)
translation (= 1.6)
uglifier (= 3.0.0)
unicorn (= 5.1.0)
web-console (= 2.0)
webmock
will_paginate (= 3.1.0)
will_paginate-bootstrap (= 1.0.1)
RUBY VERSION
ruby 2.3.0p0
BUNDLED WITH
1.13.7
Bundle install result:
Using rake 11.3.0
Using i18n 0.7.0
Using json 1.8.6
Using minitest 5.10.1
Using thread_safe 0.3.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using mime-types-data 3.2016.0521
Using arel 6.0.4
Using public_suffix 2.0.5
Using execjs 2.7.0
Using awesome_print 1.6.1
Using htmlentities 4.3.4
Using rubyzip 1.1.7
Using bcrypt 3.1.11
Using benchmark-ips 2.7.2
Using debug_inspector 0.0.2
Using sass 3.4.23
Using byebug 9.0.6
Using choice 0.2.0
Using coffee-script-source 1.12.2
Using thor 0.19.4
Using concurrent-ruby 1.0.4
Using tilt 2.0.5
Using docile 1.1.5
Using simplecov-html 0.10.0
Using connection_pool 2.2.1
Using safe_yaml 1.0.4
Using daemons 1.2.4
Using database_cleaner 1.5.3
Using get_process_mem 0.2.1
Using heapy 0.1.2
Using memory_profiler 0.9.7
Using orm_adapter 0.5.0
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using diff-lcs 1.2.5
Using eventmachine 1.0.9.1
Using multipart-post 2.0.0
Using flamegraph 0.9.5
Using locale 2.1.2
Using text 1.3.1
Using hashdiff 0.3.2
Using kgio 2.11.0
Using libv8 3.16.14.17
Using sqlite3 1.3.13
Using nested_form 0.3.2
Using pg 0.18.4
Using bundler 1.13.7
Using ruby-graphviz 1.2.2
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using remotipart 1.3.1
Using raindrops 0.17.0
Using redis 3.3.2
Using ref 2.0.0
Using rspec-support 3.5.0
Using temple 0.7.7
Using stackprof 0.2.10
Using will_paginate 3.1.0
Using faker 1.7.2
Using tzinfo 1.2.2
Using nokogiri 1.7.0.1
Using rack-test 0.6.3
Using warden 1.2.6
Using rack-protection 1.5.3
Using rack-mini-profiler 0.10.1
Using mime-types 3.1
Using addressable 2.5.0
Using autoprefixer-rails 6.6.1
Using uglifier 3.0.0
Using binding_of_caller 0.7.2
Using coffee-script 2.4.1
Using figaro 1.1.1
Using sprockets 3.7.1
Using haml 4.0.7
Using simplecov 0.12.0
Using crack 0.4.3
Using derailed_benchmarks 1.3.2
Using unf 0.1.4
Using thin 1.5.1
Using faraday 0.11.0
Using gettext 3.1.7
Using rails_12factor 0.0.3
Using unicorn 5.1.0
Using sidekiq 4.1.1
Using therubyracer 0.12.2
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using slim 3.0.6
Using will_paginate-bootstrap 1.0.1
Using activesupport 4.2.7.1
Using loofah 2.0.3
Using axlsx 2.1.0.pre
Using rack-pjax 0.8.0
Using sinatra 1.4.7
Using mail 2.6.4
Using bootstrap-sass 3.3.6
Using codeclimate-test-reporter 1.0.4
Using webmock 2.3.2
Using derailed 0.1.0
Using domain_name 0.5.20161129
Using skinny 0.2.4
Using sentry-raven 0.15.6
Using translation 1.6
Using rspec-its 1.2.0
Using rspec 3.5.0
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.7
Using activemodel 4.2.7.1
Using factory_girl 4.0.0
Using shoulda-matchers 3.1.1
Using spring 2.0.0
Using rails-html-sanitizer 1.0.3
Using http-cookie 1.0.3
Using mailcatcher 0.6.5
Using rspec-sidekiq 2.2.0
Using rails-dom-testing 1.0.8
Using activejob 4.2.7.1
Using activerecord 4.2.7.1
Using rest-client 2.0.0
Using actionview 4.2.7.1
Using annotate 2.7.1
Using rails-erd 1.5.0
Using dhis2 2.2.1 from git://github.com/BLSQ/dhis2.git (at master#d91e3eb)
Using actionpack 4.2.7.1
Using actionmailer 4.2.7.1
Using axlsx_rails 0.5.0
Using railties 4.2.7.1
Using sprockets-rails 3.2.0
Using kaminari 0.17.0
Using simple_form 3.2.1
Using coffee-rails 4.1.0
Using responders 2.3.0
Using factory_girl_rails 4.0.0
Using font-awesome-rails 4.7.0.1
Using jquery-rails 4.1.1
Using jquery-ui-rails 5.0.5
Using rest-client-logger 0.0.1
Using rspec-rails 3.5.2
Using sass-rails 5.0.6
Using rails 4.2.7.1
Using web-console 2.0.0
Using devise 4.0.0
Using chosen-rails 1.5.2
Using rails4-autocomplete 1.1.1
Using rails_admin 0.8.1
Bundle complete! 52 Gemfile dependencies, 150 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Problem
More than likely, the line in your Gemfile that includes the json gem looks like this:
gem 'json', '~> 2.0', '>= 2.0.3'
or something similar. This is telling rails that you want a specific version of the json gem and that the gem must be between version 2.0.3 and 2.1. The error you are getting indicates that rails is expecting an earlier version of the gem.
Solution
Remove the version indicators so that the json line in your Gemfile looks like this:
gem 'json', '~> 1.8', '>= 1.8.6'
If that doesn't work, then simply try this:
gem 'json'
Don't forget to run bundle install after modifying your Gemfile!
The version required by the gemfile is json 1.8.6 which is older than json 2.0.2 which you already have, you can try this
gem 'json', '1.8.6'
Downgrade to json 1.8.6, might be helpful.

Rails & docker - can't install json gem

I tried to use panamax-ui (a RoR application) on docker.
I worked on it couples of days (local and docker), modified it with success etc.
Then I've added some new fonctionnalities and some gems.
I've bundle install everything.
Then I wanted to re-build my docker (docker build)
but I've go this error :
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb creating Makefile
make "DESTDIR=" clean sh: make: not found
make "DESTDIR=" sh: make: not found
make failed, exit code 127
Gem files will remain installed in
/usr/lib/ruby/gems/2.1.0/gems/json-1.8.3 for inspection. Results
logged to
/usr/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/json-1.8.3/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot
continue. Make sure that gem install json -v '1.8.3' succeeds before
bundling. The command '/bin/sh -c bundle install --without development
test' returned a non-zero code: 5
I tried to remove the Gemfile.lock and re-run bundle install then rebuild the docker, same error...
this is my Gemfile :
source 'https://rubygems.org'
gem 'rails', '4.1.7'
gem 'puma', '2.8.2'
gem 'sqlite3', '1.3.9'
gem 'faraday_middleware', '0.9.0'
gem 'docker-api', '1.13.0', require: 'docker'
gem 'fleet-api', '1.1.0', require: 'fleet'
gem 'active_model_serializers', '0.9.0'
gem 'octokit', '3.2.0'
gem 'kmts', '2.0.1'
gem 'devise'
gem "devise_ldap_authenticatable"
gem 'json', '1.8.3'
group :test, :development do
gem 'rspec-rails'
gem 'its'
end
group :test do
gem 'coveralls', '0.7.0'
gem 'shoulda-matchers', '2.6.1'
gem 'database_cleaner', '1.3.0'
gem 'webmock', '1.20.0'
end
and my Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.7)
actionview (= 4.1.7)
activesupport (= 4.1.7)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.7)
activesupport (= 4.1.7)
builder (~> 3.1)
erubis (~> 2.7.0)
active_model_serializers (0.9.0)
activemodel (>= 3.2)
activemodel (4.1.7)
activesupport (= 4.1.7)
builder (~> 3.1)
activerecord (4.1.7)
activemodel (= 4.1.7)
activesupport (= 4.1.7)
arel (~> 5.0.0)
activesupport (4.1.7)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.3.8)
archive-tar-minitar (0.5.2)
arel (5.0.1.20140414130214)
bcrypt (3.1.11)
builder (3.2.2)
concurrent-ruby (1.0.2)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
crack (0.4.3)
safe_yaml (~> 1.0.0)
database_cleaner (1.3.0)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
devise_ldap_authenticatable (0.8.5)
devise (>= 3.4.1)
net-ldap (>= 0.6.0, <= 0.11)
diff-lcs (1.2.5)
docile (1.1.5)
docker-api (1.13.0)
archive-tar-minitar
excon (>= 0.37.0)
json
domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
excon (0.50.1)
faraday (0.8.11)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
fleet-api (1.1.0)
excon (>= 0.27.4)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
its (0.2.0)
rspec-core
json (1.8.3)
kmts (2.0.1)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
minitest (5.9.0)
multi_json (1.12.1)
multipart-post (1.2.0)
net-ldap (0.11)
netrc (0.11.0)
octokit (3.2.0)
sawyer (~> 0.5.3)
orm_adapter (0.5.0)
puma (2.8.2)
rack (>= 1.1, < 2.0)
rack (1.5.5)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.7)
actionmailer (= 4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
activemodel (= 4.1.7)
activerecord (= 4.1.7)
activesupport (= 4.1.7)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.7)
sprockets-rails (~> 2.0)
railties (4.1.7)
actionpack (= 4.1.7)
activesupport (= 4.1.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.2.2)
responders (1.1.2)
railties (>= 3.2, < 4.2)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec-core (3.5.1)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
safe_yaml (1.0.4)
sawyer (0.5.5)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
shoulda-matchers (2.6.1)
activesupport (>= 3.0.0)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.6.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
term-ansicolor (1.3.2)
tins (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tins (1.10.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
warden (1.2.6)
rack (>= 1.0)
webmock (1.20.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
PLATFORMS
ruby
DEPENDENCIES
active_model_serializers (= 0.9.0)
coveralls (= 0.7.0)
database_cleaner (= 1.3.0)
devise
devise_ldap_authenticatable
docker-api (= 1.13.0)
faraday_middleware (= 0.9.0)
fleet-api (= 1.1.0)
its
json (= 1.8.3)
kmts (= 2.0.1)
octokit (= 3.2.0)
puma (= 2.8.2)
rails (= 4.1.7)
rspec-rails
shoulda-matchers (= 2.6.1)
sqlite3 (= 1.3.9)
webmock (= 1.20.0)
BUNDLED WITH
1.12.5
Remember : The problem is when I do docker build
thanks for your help
As with any Ruby installation, you need dev tools to install gems with native extensions:
RUN apk update \
&& apk add --no-cache \
build-base \
ruby-dev
panamax-ui uses Alpine Linux base image, so you can try to add ruby-json apk package to Dockerfile to get json gem installed properly:
FROM centurylink/panamax-ruby-base:0.4.0
RUN apk-install ruby-json
CMD bundle exec rails s

Resources