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 :-)
Related
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
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
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
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
Trying to run 'rails g rspec:install' and keep running into error:
Could not find xpath-2.0.0 in any of the sources
Run `bundle install` to install missing gems.
I am running
ruby 2.2.0p0
rails 4.2.0
I have tried looking around for answers, but as I am relatively new to ruby and rails I couldn't find an answer. I have tried some of the following suggestions from other threads to no avail:
sometimes we doesn’t get response from http://rubygems.org/ so it will shows error again try gem install rake to install latest version (10.0.4) of rake, and next bundle update rake to update the Gemfile.lock
(Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound))
and
Try to delete Gemfile.lock and bundle install
(Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound))
no luck with any of those options.
GemFile:
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'rspec-rails', '~> 2.0'
end
group :test do
gem 'capybara', '~>2.1.0'
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0)
activesupport (= 4.2.0)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (3.5.1)
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.9.0)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.3.0)
globalid (0.3.0)
activesupport (>= 4.1.0)
hike (1.2.3)
i18n (0.7.0)
jbuilder (2.2.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
multi_json (1.10.1)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
railties (4.2.0)
actionpack (= 4.2.0)
activesupport (= 4.2.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
rspec-collection_matchers (1.1.2)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.3)
rspec-rails (2.99.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-collection_matchers
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
sass (3.4.11)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
slop (3.6.0)
spring (1.2.0)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
byebug
capybara (~> 2.1.0)
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
rails (= 4.2.0)
rspec-rails (~> 2.0)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
- RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [universal.x86_64-darwin14]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /volumes/ALEX/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-14
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /volumes/ALEX/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Users/alexmattson/.rbenv/versions/2.2.0/bin/
which gem
/usr/bin/gem
which bundle
/usr/bin/bundle
Not sure what the hang up would be as it's listed as a dependency of Capybara, but have you tried:
gem install xpath -v '2.0.0'
If that succeeds, rerun your bundle install.
Edit:
It looks like you're trying to use RBENV, but your gems are installing to your system version of Ruby. First, you should never have to use sudo on a gem install using RVM or RBENV.
Taken from the RBENV install documentation: https://github.com/sstephenson/rbenv
It looks like step 3 might have been skipped, so verify by running from step 4:
type rbenv
#=> "rbenv is a function"
If this fails, you'll need to add eval "$(rbenv init -)" to your shell (.bash_profile, .bashrc or .zshrc depending on what OS and shell you're running).
Make sure to restart your terminal for any shell changes to take effect.
Run rbenv rehash then you should get something like this when you run which gem again:
which gem
#=> /Users/your-user-name/.rbenv/shims/gem
If this works, run gem install bundle, cd into your project directory and bundle install should work.
Yes, new version of RudyOnRails has some conflicts with Spring. Just try type in console spring stop and rerun rails generate rspec:install
Find out more info in https://github.com/rspec/rspec-rails/issues/996
It looks like I had a bad install of rbenv. After a reinstall it fixed the issue.