heroku push rejected, failed to compile Ruby app - ruby-on-rails

When I run the command "git push -f heroku", I get the following problem:
Fetching repository, done.
Counting objects: 55, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (35/35), 9.26 KiB | 0 bytes/s, done.
Total 35 (delta 20), reused 14 (delta 2)
-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
Ruby version change detected. Clearing bundler cache.
Old: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
New: ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
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.
You have deleted from the Gemfile:
* geocoder
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.
You have deleted from the Gemfile:
* geocoder
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:tummystuffer.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:tummystuffer.git'
So I added the gem 'geocoder' inside of my Gemfile, removed Gemfile.lock, ran "bundle install", "git add", "git commit", and pushed again, but got the same exact error.
I tried to solve the problem from this: heroku push rejected, failed to compile Ruby/rails app, but still gave me the same error.
I've ran "gem cleanup" and ran "gem update" as well, but did not work.
Here is my Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
# Rails defaults
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
# rails-bootstrap
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'figaro'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form', '>= 3.0.0.rc'
group :development, :test do
gem 'sqlite3'
gem 'better_errors'
gem 'quiet_assets'
end
group :production do
gem 'pg'
gem 'thin'
gem 'rails_on_heroku'
end
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'mail'
gem 'oauth2'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'best_in_place'
gem "font-awesome-rails"
gem 'geocoder'
EDIT:
Here is my Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
mail (~> 2.5.4)
actionpack (4.1.0)
actionview (= 4.1.0)
activesupport (= 4.1.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
activerecord (4.1.0)
activemodel (= 4.1.0)
activesupport (= 4.1.0)
arel (~> 5.0.0)
activerecord-tableless (1.3.3)
activerecord (>= 2.3.0)
activesupport (4.1.0)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
best_in_place (0.2.3)
rails (>= 3.0.0)
better_errors (1.1.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
builder (3.2.2)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
commonjs (0.2.7)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
geocoder (1.2.0)
google_drive (0.3.9)
nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
oauth (>= 0.3.6)
oauth2 (>= 0.5.0)
hashie (2.1.1)
high_voltage (2.1.0)
hike (1.2.3)
i18n (0.6.9)
jbuilder (2.0.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (0.1.11)
multi_json (>= 1.5)
less (2.5.0)
commonjs (~> 0.2.7)
less-rails (2.5.0)
actionpack (>= 3.1)
less (~> 2.5.0)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.5.3)
minitest (5.3.3)
multi_json (1.9.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth (0.4.7)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
omniauth-twitter (1.0.1)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
pg (0.17.1)
polyglot (0.3.4)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.0)
actionmailer (= 4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
activemodel (= 4.1.0)
activerecord (= 4.1.0)
activesupport (= 4.1.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
rails_on_heroku (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.1)
ref (1.0.5)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
simple_form (3.1.0.rc1)
actionpack (~> 4.0)
activemodel (~> 4.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
twitter-bootstrap-rails (2.2.8)
actionpack (>= 3.1)
execjs
rails (>= 3.1)
railties (>= 3.1)
tzinfo (1.1.0)
thread_safe (~> 0.1)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
ruby
DEPENDENCIES
activerecord-tableless
best_in_place
better_errors
bootstrap-sass
coffee-rails (>= 4.0.0)
figaro
font-awesome-rails
geocoder
google_drive
high_voltage
jbuilder (>= 1.2)
jquery-rails
less-rails
mail
oauth2
omniauth-facebook
omniauth-twitter
pg
quiet_assets
rails (>= 4.0.0)
rails_on_heroku
sass-rails (>= 4.0.0)
simple_form (>= 3.0.0.rc)
sqlite3
therubyracer
thin
turbolinks
twitter-bootstrap-rails
uglifier (>= 1.3.0)
Any help will be appreciated.

The error states:
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.
This basically means you've either not committed your Gemfile.lock, or have not run the bundle install command, which basically rebuilds Gemfile.lock. There's now a conflict which you'll have to resolve using bundle install on your development environment:
$ bundle install
$ git add .
$ git commit -a -m "Geocoder"
$ git push -f heroku

I had the same problem. A simple bundle install solved the problem for me.
After bundle install, git add . and git commit, I pushed the code to heroku master and it worked!
$ git push -f heroku master

I was actually able to solve the issue. I found out I was trying to push the project to another branch (not the master branch). I solved the issue by merging the branch with master branch and pushed it again.

It's an old thread but still relevant... I solved this by doing:
1) in the terminal create a new branch fixes
git checkout -b fixes
2) Delete gemfile.lock
3) In the gemfile replace gem 'squlite3' and gem 'pg' with this
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg', '0.20.0'
end
4) run these commands in terminal
bundle update
bundle install --without production
git add .
git commit "Update files for heroku"
git checkout master
git merge fixes
git push -f heroku master

Related

Could not find aws-eventstream-1.1.0 in any of the sources

I have four error messages mentioned below:
Could not find aws-eventstream-1.1.0 in any of the sources
Failed to install gems via Bundler
Push rejected, failed to compile Ruby app
[remote rejected] user-microposts -> master (pre-receive hook declined)
I think number one is the cause of the latter. But I can't find any proper information about how to get the gem aws-eventstream-1.1.0 in "the sources". I just follow the Ruby-on-Rails course of Michael Hartl.
Michael Hartl thinks it has to do with the AWS configuration.
So it would be very convenient if there a way to check wether the configuration is good before deploying. Does this exist?
Since I will only use this AWS-account for the sake of this course I will share the configuration data:
cli:
➜ sample_app git:(following-users)$ heroku config:set \
AWS_ACCESS_KEY_ID=AKIAXOOFOGFFI62ZSAJR \
AWS_SECRET_ACCESS_KEY=WI2ez9rn16SgqmKFcV9CsUt9hqLkpf49iktsKpa+ \
AWS_REGION=eu-central-1 \
AWS_BUCKET=rails-tutorial-josufst-1
storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
amazon:
service: S3
access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
region: <%= ENV['AWS_REGION'] %>
bucket: <%= ENV['AWS_BUCKET'] %>
Below I posted the Gemfile and Gemfile.lock and the .gitignore.
The aws-eventstream-1.1.0 seems to be present in the Gemfile.lock.
I tried to do:
bundle install
bundle update
git add -A
git commit -m "whatever I tried"
git push heroku user-microposts:master
Also I run the app locally and run all tests locally. Everything works fine.
As far as I know I followed all the steps in the Ruby on Rails Tutorial.
And now I tried the git push -f heroku user-microposts:master (force) to see if it has something to do with the "hook". Although, as a newbie I don't understand the concept of hook.
➜ sample_app git:(user-microposts) git push -f heroku user-microposts:master
Enumerating objects: 1525, done.
Counting objects: 100% (1525/1525), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1307/1307), done.
Writing objects: 100% (1394/1394), 4.90 MiB | 65.00 KiB/s, done.
Total 1394 (delta 310), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.0.2
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.3
remote: -----> Installing dependencies using bundler 2.0.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote:
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 rails-tutorial-josufst.
remote:
To https://git.heroku.com/rails-tutorial-josufst.git
! [remote rejected] user-microposts -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/rails-tutorial-josufst.git'
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '6.0.3.2'
gem 'image_processing', '1.9.3'
gem 'mini_magick', '4.9.5'
gem 'active_storage_validations', '0.8.9'
gem 'bcrypt', '3.1.13'
gem 'faker', '2.11.0'
gem 'will_paginate', '3.3.0'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.4.1'
gem 'puma', '4.3.5'
gem 'sass-rails', '6.0.0'
gem 'webpacker', '4.2.2'
gem 'turbolinks', '5.2.1'
gem 'jbuilder', '2.10.0'
gem 'bootsnap', '1.4.6', require: false
group :development, :test do
gem 'sqlite3', '1.4.2'
gem 'byebug', '11.1.3', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '4.0.2'
gem 'listen', '3.2.1'
gem 'spring', '2.1.0'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'capybara', '3.32.2'
gem 'selenium-webdriver', '3.142.7'
gem 'webdrivers', '4.3.0'
gem 'rails-controller-testing', '1.0.4'
gem 'minitest', '5.11.3'
gem 'minitest-reporters', '1.3.8'
gem 'guard', '2.16.2'
gem 'guard-minitest', '2.4.6'
end
group :production do
gem 'pg', '1.2.3'
gem 'aws-sdk-s3', '1.46.0', require: false
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# Uncomment the following line if you're running Rails
# on a native Windows system:
# gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.3.2)
actionpack (= 6.0.3.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.2)
actionpack (= 6.0.3.2)
activejob (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
mail (>= 2.7.1)
actionmailer (6.0.3.2)
actionpack (= 6.0.3.2)
actionview (= 6.0.3.2)
activejob (= 6.0.3.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.2)
actionview (= 6.0.3.2)
activesupport (= 6.0.3.2)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.2)
actionpack (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
nokogiri (>= 1.8.5)
actionview (6.0.3.2)
activesupport (= 6.0.3.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_storage_validations (0.8.9)
rails (>= 5.2.0)
activejob (6.0.3.2)
activesupport (= 6.0.3.2)
globalid (>= 0.3.6)
activemodel (6.0.3.2)
activesupport (= 6.0.3.2)
activerecord (6.0.3.2)
activemodel (= 6.0.3.2)
activesupport (= 6.0.3.2)
activestorage (6.0.3.2)
actionpack (= 6.0.3.2)
activejob (= 6.0.3.2)
activerecord (= 6.0.3.2)
marcel (~> 0.3.1)
activesupport (6.0.3.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
autoprefixer-rails (9.8.6.3)
execjs
aws-eventstream (1.1.0)
aws-partitions (1.364.0)
aws-sdk-core (3.105.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.37.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.46.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-will_paginate (1.0.0)
will_paginate
builder (3.2.4)
byebug (11.1.3)
capybara (3.32.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.7)
crass (1.0.6)
erubi (1.9.0)
execjs (2.7.0)
faker (2.11.0)
i18n (>= 1.6, < 2)
ffi (1.13.1)
formatador (0.2.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
image_processing (1.9.3)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.7.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest-reporters (1.3.8)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.3.3)
nenv (0.3.0)
nio4r (2.5.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pg (1.2.3)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (4.3.5)
nio4r (~> 2.0)
rack (2.2.3)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.3.2)
actioncable (= 6.0.3.2)
actionmailbox (= 6.0.3.2)
actionmailer (= 6.0.3.2)
actionpack (= 6.0.3.2)
actiontext (= 6.0.3.2)
actionview (= 6.0.3.2)
activejob (= 6.0.3.2)
activemodel (= 6.0.3.2)
activerecord (= 6.0.3.2)
activestorage (= 6.0.3.2)
activesupport (= 6.0.3.2)
bundler (>= 1.3.0)
railties (= 6.0.3.2)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
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.3.2)
actionpack (= 6.0.3.2)
activesupport (= 6.0.3.2)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.7.1)
ruby-progressbar (1.10.1)
ruby-vips (2.0.17)
ffi (~> 1.9)
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)
shellany (0.0.1)
spring (2.1.0)
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.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.3.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.4.0)
PLATFORMS
ruby
DEPENDENCIES
active_storage_validations (= 0.8.9)
aws-sdk-s3 (= 1.46.0)
bcrypt (= 3.1.13)
bootsnap (= 1.4.6)
bootstrap-sass (= 3.4.1)
bootstrap-will_paginate (= 1.0.0)
byebug (= 11.1.3)
capybara (= 3.32.2)
faker (= 2.11.0)
guard (= 2.16.2)
guard-minitest (= 2.4.6)
image_processing (= 1.9.3)
jbuilder (= 2.10.0)
listen (= 3.2.1)
mini_magick (= 4.9.5)
minitest (= 5.11.3)
minitest-reporters (= 1.3.8)
pg (= 1.2.3)
puma (= 4.3.5)
rails (= 6.0.3.2)
rails-controller-testing (= 1.0.4)
sass-rails (= 6.0.0)
selenium-webdriver (= 3.142.7)
spring (= 2.1.0)
spring-watcher-listen (= 2.0.1)
sqlite3 (= 1.4.2)
turbolinks (= 5.2.1)
web-console (= 4.0.2)
webdrivers (= 4.3.0)
webpacker (= 4.2.2)
will_paginate (= 3.3.0)
BUNDLED WITH
2.1.4
.gitignore
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-*
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/public/assets
.byebug_history
# Ignore master key for decrypting credentials and more.
/config/master.key
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
# Ignore vendor/bundle
/vendor/bundle
As you say, it's the first error which is causing the other error reports you've read. So we should focus on that. Specifically, we will focus on this part.
remote: -----> Installing dependencies using bundler 2.0.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
This snippet is Bundler running on Heroku and failing.
It is good debugging practice when working with containers (that's what Heroku runs your app on, a container. A container is a virtual computer within a computer) to first get the failing thing to run locally on your native machine first (whatever you've been developing on). It is good debugging practice to this because it simplifies what could go wrong and, typically, if you can get it to work locally on your native machine then it'll work in the container.
So, we're running a test. We need to make sure our test is the same as what occurs in the container. Luckily Bundler is a babe and it's told us what command it's running:
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
So we need to get that command to run locally on your machine.
It is time to step through each component of this bundle install command and spend the time to learn what it is doing. Or it would be in most cases, as that's the unfortunate truth to debugging; it usually takes patient slow methodical work.
But, I suspect I know the answer here. Notice the --deployment flag option in the command above. That puts Bundler in deployment mode, which gears it up for Production usage (it's default is for development usage). One of the things that does is tells Bundler to not download gems from rubygems.org (the default) but, instead grab them from the local directory vendor/cache/.
I suspect that you've, in your git branch, got a vendor/cache/ directory but it doesn't contain all the gems Bundle expects. Hence these complaints from Bundler.
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find aws-eventstream-1.1.0 in any of the sources
One option would be to remove the --deployment flag but, my guess is that's not an option because Heroku controls what command is used and we can't change it. I've not any experience with Heroku but, if my better idea doesn't work we can come back and explore this option.
So! I need some information from you please. Can you share your .gitignore file please?

Unable to push rails app to Heroku turbolinks

While pushing my rails application to heroku , the following warnings are encountered and Im unable to push the app to heroku.
Counting objects: 94, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (79/79), done.
Writing objects: 100% (94/94), 24.22 KiB | 0 bytes/s, done.
Total 94 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.1
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
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: You have deleted from the Gemfile:
remote: * turbolinks (~> 5)
remote: Bundler Output: 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: You have deleted from the Gemfile:
remote: * turbolinks (~> 5)
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 fast-gorge-62659.
remote:
To https://git.heroku.com/fast-gorge-62659.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fast-gorge-62659.git'
Gem file:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'bootstrap'
gem 'jquery-rails'
gem 'devise'
Gem lock file:
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.0)
actionpack (= 5.2.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0)
activesupport (= 5.2.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.0)
activesupport (= 5.2.0)
globalid (>= 0.3.6)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
marcel (~> 0.3.1)
activesupport (5.2.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
autoprefixer-rails (8.6.3)
execjs
bcrypt (3.1.12)
bindex (0.5.0)
bootsnap (1.3.0)
msgpack (~> 1.0)
bootstrap (4.1.1)
autoprefixer-rails (>= 6.0.3)
popper_js (>= 1.12.9, < 2)
sass (>= 3.5.2)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (10.0.2)
capybara (3.2.1)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
xpath (~> 3.1)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (1.2.0)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
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.0.5)
crass (1.0.4)
devise (4.4.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
responders
warden (~> 1.2.3)
erubi (1.7.1)
execjs (2.7.0)
ffi (1.9.25)
globalid (0.4.1)
activesupport (>= 4.2.0)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
mimemagic (~> 0.3.2)
method_source (0.9.0)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
msgpack (1.2.4)
multi_json (1.13.1)
nio4r (2.3.1)
nokogiri (1.8.3)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
pg (1.0.0)
popper_js (1.12.9)
public_suffix (3.0.2)
puma (3.11.4)
rack (2.0.5)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
bundler (>= 1.3.0)
railties (= 5.2.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sass (3.5.6)
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.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
selenium-webdriver (3.12.0)
childprocess (~> 0.5)
rubyzip (~> 1.2)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
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)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.12)
execjs (>= 0.3.0, < 3)
warden (1.2.7)
rack (>= 1.0)
web-console (3.6.2)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.1.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
bootsnap (>= 1.1.0)
bootstrap
bootstrap-sass (~> 3.3, >= 3.3.7)
byebug
capybara (>= 2.15, < 4.0)
chromedriver-helper
coffee-rails (~> 4.2)
devise
jbuilder (~> 2.5)
jquery-rails
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
puma (~> 3.11)
rails (~> 5.2.0)
sass-rails (~> 5.0)
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
RUBY VERSION
ruby 2.5.1p57
BUNDLED WITH
1.16.2
I tried many suggestions on stackoverflow for similar errors. None of them wored for me.
Note:
I have removed turbolinks completely from my rails app . (from
application.js and from gemfile). In between , I did not commit a
gemlock file . But later I have done all the solution out there and
solved the gemlock issue.
Please help me in this .
Thanks in advance.
Run bundle install then commit the generated Gemfile.lock to the repo, then do the push to heroku
If problem persists just bundle install and then remove Gemfile.lock file and then push to heroku.
I was new to heroku and did not have much knowledge about it.
Tried with the suggestons from #djmayank and #neydroid , still my app did get pushed to heroku.
Finally I found that it was a very small mistake that took my hours on this issue. So in addition to the other solutions , the below newbie mistake I shall mention here.
I had a master branch and a development branch on git . I tried to push to heroku master from the git development branch .It failed. I then tried to push to heroku development from git development branch , but that took me nowhere and only a webpage saying
"welcome to heroku"
was shown.
Then when I switched to git master branch and pushed to heroku master, everything worked fine.
Hope this helps someone out there.
Thanks for your time and help !

Rails 4: Heroku push rejected / Gemfile Issues / GIT Issues

I am truly confused and your help and explanation will be much much appreciated.
1.] my gemfile currently is displayed as below:
source 'https://rubygems.org'
gem 'rails', '4.1.10'
gem 'bcrypt', '3.1.7'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
# gem 'foundation-rails', '5.4.5'
gem 'foundation-rails', '5.3.1.0'
gem 'simple_form'
gem "font-awesome-rails"
gem 'devise'
gem "ransack", github: "activerecord-hackery/ransack", branch: "rails-4.1"
gem "polyamorous", :github => "activerecord-hackery/polyamorous"
gem 'carrierwave'
gem 'rmagick'
gem 'acts_as_commentable'
gem "cocoon"
gem 'geocoder'
gem 'social-share-button'
gem 'twilio-ruby'
gem 'cancancan', '~> 1.10'
gem 'public_activity'
gem 'foundation-datetimepicker-rails'
gem 'jquery-ui-rails'
gem 'stripe'
gem "stripe_event"
gem 'cloudinary'
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
gem 'quiet_assets'
gem 'mailcatcher'
gem "better_errors"
gem 'awesome_print'
gem 'pry'
gem 'binding_of_caller'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor'
gem 'unicorn', '4.8.3'
end
2.] my gemlock file is currently displayed as below:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.10)
actionpack (= 4.1.10)
actionview (= 4.1.10)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.10)
actionview (= 4.1.10)
activesupport (= 4.1.10)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.10)
activesupport (= 4.1.10)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.10)
activesupport (= 4.1.10)
builder (~> 3.1)
activerecord (4.1.10)
activemodel (= 4.1.10)
activesupport (= 4.1.10)
arel (~> 5.0.0)
activesupport (4.1.10)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
acts_as_commentable (4.0.2)
ansi (1.5.0)
arel (5.0.1.20140414130214)
awesome_print (1.6.1)
aws_cf_signer (0.1.3)
bcrypt (3.1.7)
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.3.pre1)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (3.4.0)
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
cancancan (1.13.1)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
cloudinary (1.2.0)
aws_cf_signer
rest-client
cocoon (1.2.6)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
columnize (0.9.0)
daemons (1.2.3)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
devise (3.5.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
eventmachine (1.0.5)
execjs (2.6.0)
ffi (1.9.10)
font-awesome-rails (4.4.0.0)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
foundation-datetimepicker-rails (0.2.1)
foundation-rails (5.3.1.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
geocoder (1.2.11)
guard (2.13.0)
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-minitest (2.3.1)
guard (~> 2.0)
minitest (>= 3.0)
hike (1.2.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
jbuilder (2.3.1)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (5.0.2)
railties (>= 3.2.16)
json (1.8.3)
jwt (1.5.1)
kgio (2.10.0)
listen (3.0.3)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mailcatcher (0.6.1)
activesupport (>= 4.0.0, < 5)
eventmachine (~> 1.0.0, <= 1.0.5)
mail (~> 2.3)
sinatra (~> 1.2)
skinny (~> 0.2.3)
sqlite3 (~> 1.3)
thin (~> 1.5.0)
method_source (0.8.2)
mime-types (2.99.2)
mini_backtrace (0.1.3)
minitest (> 1.2.0)
rails (>= 2.3.3)
minitest (5.8.0)
minitest-reporters (1.0.5)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
multi_json (1.11.2)
nenv (0.2.0)
netrc (0.11.0)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
orm_adapter (0.5.0)
pg (0.17.1)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_activity (1.4.2)
actionpack (>= 3.0.0)
activerecord (>= 3.0)
i18n (>= 0.5.0)
railties (>= 3.0.0)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.5.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.10)
actionmailer (= 4.1.10)
actionpack (= 4.1.10)
actionview (= 4.1.10)
activemodel (= 4.1.10)
activerecord (= 4.1.10)
activesupport (= 4.1.10)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.10)
sprockets-rails (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.1.10)
actionpack (= 4.1.10)
activesupport (= 4.1.10)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.15.0)
rake (11.1.2)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (4.2.0)
json (~> 1.4)
responders (1.1.2)
railties (>= 3.2, < 4.2)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rmagick (2.15.4)
ruby-progressbar (1.7.5)
sass (3.2.19)
sass-rails (4.0.5)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
shellany (0.0.1)
simple_form (3.1.1)
actionpack (~> 4.0)
activemodel (~> 4.0)
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
skinny (0.2.3)
eventmachine (~> 1.0.0)
thin (~> 1.5.0)
slop (3.6.0)
social-share-button (0.1.8)
coffee-rails
sass-rails
spring (1.1.3)
sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
stripe (1.46.0)
rest-client (~> 1.4)
stripe_event (1.5.0)
activesupport (>= 3.1)
stripe (~> 1.6)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
turbolinks (2.5.3)
coffee-rails
twilio-ruby (4.5.0)
builder (>= 2.1.2)
jwt (~> 1.0)
multi_json (>= 1.3.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicorn (4.8.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
warden (1.2.3)
rack (>= 1.0)
web-console (2.0.0.beta3)
activemodel (~> 4.0)
binding_of_caller (= 0.7.3.pre1)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
PLATFORMS
ruby
DEPENDENCIES
acts_as_commentable
awesome_print
bcrypt (= 3.1.7)
better_errors
binding_of_caller
byebug (= 3.4.0)
cancancan (~> 1.10)
carrierwave
cloudinary
cocoon
coffee-rails (~> 4.0.0)
devise
font-awesome-rails
foundation-datetimepicker-rails
foundation-rails (= 5.3.1.0)
geocoder
guard-minitest (= 2.3.1)
jbuilder (~> 2.0)
jquery-rails
jquery-turbolinks
jquery-ui-rails
mailcatcher
mini_backtrace (= 0.1.3)
minitest-reporters (= 1.0.5)
pg (= 0.17.1)
polyamorous!
pry
public_activity
quiet_assets
rails (= 4.1.10)
rails_12factor
ransack!
rmagick
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
simple_form
social-share-button
spring (= 1.1.3)
sqlite3 (= 1.3.9)
stripe
stripe_event
turbolinks
twilio-ruby
uglifier (>= 1.3.0)
unicorn (= 4.8.3)
web-console (= 2.0.0.beta3)
3.] when ever i run bundle install some additional info gets added to my gemfile called GIT - i believe this is what is causing heroku not to accept deployment of my app
GIT
remote: git://github.com/activerecord-hackery/polyamorous.git
revision: 8f722a1edfaf20dbb14b21e422c629249a6fbfa6
specs:
polyamorous (1.3.1)
activerecord (>= 3.0)
GIT
remote: git://github.com/activerecord-hackery/ransack.git
revision: 742425ade4bb66db573dc13bf436a8f3c87b733b
branch: rails-4.1
specs:
ransack (1.2.4)
actionpack (>= 4.0)
activerecord (>= 4.0)
activesupport (>= 4.0)
i18n
polyamorous (~> 1.1)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.10)
actionpack (= 4.1.10)
actionview (= 4.1.10)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.10)
actionview (= 4.1.10)
activesupport (= 4.1.10)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.10)
activesupport (= 4.1.10)
etc............
4.] when i do git push heroku master i get the below error message:
Counting objects: 3218, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3089/3089), done.
Writing objects: 100% (3218/3218), 175.45 MiB | 602.00 KiB/s, done.
Total 3218 (delta 787), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
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: You have added to the Gemfile:
remote: * source: git://github.com/activerecord-hackery/polyamorous.git (at master)
remote: * source: git://github.com/activerecord-hackery/ransack.git (at rails-4.1)
remote: Bundler Output: 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: You have added to the Gemfile:
remote: * source: git://github.com/activerecord-hackery/polyamorous.git (at master)
remote: * source: git://github.com/activerecord-hackery/ransack.git (at rails-4.1)
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 my-app-name.
remote:
To https://git.heroku.com/my-app-name.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-app-name.git'
could one kindly tell me exactly how to resolve this as i have no
clue. i apologise if it is a basic question, but your help would be
much much appreciated - could you also advise me how i over-ride or update the Gemfile.lock
Your gemfile is not up-to-date. Make sure you bundle install and then commit it to github, so all the changes are made to the source code, Now you can push to heroku.
On your local machine cd in the app directory and run bundle install
Now commit your changes to github git push origin master
Now push it to heroku git push heroku master
I had same issues this is how I solved this.
1. Run bundle install
2. Commit Gemfile.lock and push to git
after pushing to heroku its working for me.

Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources

I have been working with Rails and it sends me back this error. Please provide questions. Thanks for all the help. I will update this question with a better one because I don't know how to ask it.
Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources
~/.rvm/gems/ruby-2.0.0-p451/gems/bundler-1.6.2/lib/bundler/spec_set.rb:92:in `block in materialize'
~/.rvm/gems/ruby-2.0.0-p451/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in `map!'
~/.rvm/gems/ruby-2.0.0-p451/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in `materialize'
~/.rvm/gems/ruby-2.0.0-p451/gems/bundler-1.6.2/lib/bundler/definition.rb:133:in `specs'
~/.rvm/gems/ruby-2.0.0-p451/gems/bundler-1.6.2/lib/bundler/definition.rb:178:in `specs_for'
Show 28 more lines
I am sure my rake is latest version
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'devise', '3.0.2'
gem "seo_helper", "~> 1.0.2"
gem "open_graph_helper"
gem "rmagick"
gem "carrierwave"
gem "carrierwave-meta"
gem "settingslogic"
gem "anjlab-bootstrap-rails", "2.3.1.2", :require => "bootstrap-rails"
gem "bootstrap_helper", ">= 4.2.2.1"
gem "simple_form", "~> 3.0.1"
gem "will_paginate", "3.0.3"
gem "font-awesome-rails", "~> 3.2.1.3"
gem "high_voltage"
gem "airbrake"
gem "rvm-capistrano"
gem 'rake', '~> 10.3.2'
gem "omniauth"
gem "omniauth-facebook"
gem "auto-facebook", "0.42"
gem "whenever"
gem "hipchat"
# Cache
gem "dalli"
gem "compass-rails", "~> 1.1.2"
group :development do
gem "capistrano"
gem "capistrano-ext"
gem "cape"
gem "binding_of_caller"
gem "better_errors", "~> 0.9.0"
gem "magic_encoding"
gem "annotate"
gem "powder"
gem "pry-nav"
gem "pry-remote"
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
mail (~> 2.5.4)
actionpack (4.1.1)
actionview (= 4.1.1)
activesupport (= 4.1.1)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
activerecord (4.1.1)
activemodel (= 4.1.1)
activesupport (= 4.1.1)
arel (~> 5.0.0)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
airbrake (3.1.17)
builder
multi_json
anjlab-bootstrap-rails (2.3.1.2)
railties (>= 3.0)
sass (>= 3.2)
annotate (2.6.3)
activerecord (>= 2.3.0)
rake (>= 0.8.7)
arel (5.0.1.20140414130214)
auto-facebook (0.42)
omniauth
omniauth-facebook
rails (>= 4.0.0)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
better_errors (0.9.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap_helper (4.2.3)
railties (>= 4.0.0)
thor (~> 0.14)
will_paginate (>= 3.0.3)
builder (3.2.2)
cape (1.8.0)
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
carrierwave-meta (0.0.5)
activesupport (>= 3.0)
carrierwave (>= 0.5.7)
mime-types
chronic (0.10.2)
chunky_png (1.3.1)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
compass (0.12.6)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.2.19)
compass-rails (1.1.7)
compass (>= 0.12.2)
sprockets (<= 2.11.0)
dalli (2.7.2)
debug_inspector (0.0.2)
devise (3.0.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.0.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
font-awesome-rails (3.2.1.3)
railties (>= 3.2, < 5.0)
fssm (0.2.10)
hashie (2.1.1)
high_voltage (2.1.0)
highline (1.6.21)
hike (1.2.3)
hipchat (1.1.0)
httparty
httparty (0.13.1)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.9)
jbuilder (2.0.7)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (0.1.13)
multi_json (>= 1.5)
magic_encoding (0.0.2)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
minitest (5.3.4)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
open_graph_helper (0.2.0)
orm_adapter (0.5.0)
polyglot (0.3.4)
powder (0.2.1)
thor (>= 0.11.5)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry-nav (0.2.3)
pry (~> 0.9.10)
pry-remote (0.1.8)
pry (~> 0.9)
slop (~> 3.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.1)
actionmailer (= 4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
activemodel (= 4.1.1)
activerecord (= 4.1.1)
activesupport (= 4.1.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1)
sprockets-rails (~> 2.0)
railties (4.1.1)
actionpack (= 4.1.1)
activesupport (= 4.1.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
rdoc (4.1.1)
json (~> 1.4)
rmagick (2.13.2)
rvm-capistrano (1.5.1)
capistrano (~> 2.15.4)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sdoc (0.4.0)
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
seo_helper (1.0.2)
settingslogic (2.0.9)
simple_form (3.0.2)
actionpack (~> 4.0)
activemodel (~> 4.0)
slop (3.5.0)
spring (1.1.3)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
tzinfo (1.1.0)
thread_safe (~> 0.1)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
whenever (0.9.2)
activesupport (>= 2.3.4)
chronic (>= 0.6.3)
will_paginate (3.0.3)
PLATFORMS
ruby
DEPENDENCIES
airbrake
anjlab-bootstrap-rails (= 2.3.1.2)
annotate
auto-facebook (= 0.42)
better_errors (~> 0.9.0)
binding_of_caller
bootstrap_helper (>= 4.2.2.1)
cape
capistrano
capistrano-ext
carrierwave
carrierwave-meta
coffee-rails (~> 4.0.0)
compass-rails (~> 1.1.2)
dalli
devise (= 3.0.2)
font-awesome-rails (~> 3.2.1.3)
high_voltage
hipchat
jbuilder (~> 2.0)
jquery-rails
magic_encoding
omniauth
omniauth-facebook
open_graph_helper
powder
pry-nav
pry-remote
rails (= 4.1.1)
rmagick
rvm-capistrano
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
seo_helper (~> 1.0.2)
settingslogic
simple_form (~> 3.0.1)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
whenever
will_paginate (= 3.0.3)
I tried bundle install rake and bundle update but it still doesn't work.
Thanks for all the help.
bundle config set --local path 'vendor/cache'
generally fixes it as that is the more common problem. Basically, your bundler path configuration is messed up. See their documentation (first paragraph) for where to find those configurations and change them manually if needed.
I solved that deleting the Gemfile.lock
I think rake must be preinstalled if you want work with bundler. Try to install rake via 'gem install' and then run 'bundle install' again:
gem install rake && bundle install
If you are using rvm ( http://rvm.io ) rake is installed by default...
If you're having this issue, and try to run bundle exec jekyll serve per this Jekyll documentation, it'll ask you to run bundle install, which should prompt you to install any missing gems, which in this case will be rake. This should resolve your issue.
You may also need to run bundle update to ensure Gemfile.lock is referencing the most up-to-date gems.
Bundler 2
If you need to update from bundler v1 to v2 follow this official guide.
For a fast solution:
In root of your application run bundle config set path "/bundle" to add a custom path for bundler use, in this case I set /bundle, you can use whatever.
1.2 [Alternative solution] You can use a bundler file (~/.bundle/config) also, to use this I recommend set bundler folders in environment, like a Docker image, for example. Here the official guide.
You don't need to delete your Gemfile.lock, It's a bad practice and this can cause other future problems. Commit Gemfile.lock normaly, sometimes you need to update your bundle with bundle install or install individual gem.
You can see all the configs for bundler version 2 here.
My colleague told me that it can solved by disabling spring.
For docker users:
docker exec -ite DISABLE_SPRING=1 [container_name] rails c
Remove your Gemfile.lock.
Move to bash if you are using zsh.
sudo bash
gem update --system
Now run command bundle to create a new Gemfile.lock file.
Move back to your zsh sudo exec zsh now run your rake commands.
**
bundle install --no-deployment
**
$ jekyll help
jekyll 4.0.0 -- Jekyll is a blog-aware, static site generator in Ruby
In my case, my problem was environmental. Meaning, I did something wrong in my bash session. After attempting nearly everything in this thread, I opened a new bash session and everything was back to normal.
I solved the simmilar problem, when i tried to push to repo via gitlab ci/cd pipeline by the command "gem install rake && bundle install"
Regarding knows1's answer:
In Rails ~> 6.0.0 it complains:
[DEPRECATED] The --no-deployment flag is deprecated because it
relies on being remembered across bundler invocations, which bundler
will no longer do in future versions. Instead please use bundle config set --local deployment 'false', and stop using this flag

Rails uninitialized constant Bundler (NameError)

I'm getting the following error when running any rails commands like rails s or rails c, it's also preventing my heroku app from starting (same error):
app/config/application.rb:7:in `<top (required)>': uninitialized constant Bundler (NameError)
from /Users/you/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
Line 7 in the error message is:
Bundler.require(:default, Rails.env)
Doing the commands as bundle exec rails s succeeds, but that doesn't help the heroku app. I've verified which ruby, which rails and which bundler. I've also tried starting a new rvm gemset and reinstalling the bundle. The heroku error is identical:
/app/config/application.rb:7:in `<top (required)>': uninitialized constant Bundler (NameError)
running bundle check returns no issues.
Some similar questions suggested this:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
But I tried it and got no changes. I'm on Rails 4
edit:
I was working in another app and ran rails g model and this popped up:
Bundler is using a binstub that was created for a different gem.
This is deprecated, in future versions you may need to `bundle binstub rails` to work around a system/bundle conflict.
gemfile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.3'
gem 'sass-rails', '~> 4.0.1'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder'
gem 'bcrypt-ruby'
gem "geocoder"
gem 'gmaps4rails'
gem "paperclip"
gem 'route_translator'
gem 'aws-sdk'
gem 'ckeditor'
gem 'soundcloud'
gem 'omniauth-facebook'
gem 'twitter'
gem 'pg'
gem 'unicorn'
gem 'sass'
gem 'compass', '0.12.2'
gem 'font-awesome-rails'
gem 'acts-as-taggable-on'
gem 'json', '1.7.7'
gem 'figaro'
#for mailchimp api
gem 'gibbon'
#for deploying
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rails', '~> 1.1.0'
gem 'capistrano-bundler'
gem 'capistrano-rbenv', '~> 2.0'
gem 'exception_notification'
gem 'textacular'
gem 'mail_form'
gem 'dumper'
group :doc do
gem 'sdoc', require: false
end
# development gems
group :development, :test do
# env variables
gem "faker"
end
# Paging
gem 'kaminari'
gem 'will_paginate-bootstrap', '~> 1.0.0'
# Slugs and friendly id's
gem 'friendly_id'
# font-awesome
gem 'font-awesome-sass', '~> 4.0.2'
# production gems for heroku
group :production do
gem 'rails_12factor'
gem 'therubyracer'
gem 'execjs'
end
# Devise
gem 'devise'
gem 'chosen-rails'
# Bootstrap 3
group :development, :test do
gem 'rails_layout' # Bootstrap 3 layout generator
end
gem 'bootstrap-sass', '~> 3.0.3.0'
# RSpec
group :test, :development do
gem "rspec-rails"
gem "factory_girl_rails"
end
# Capybara
group :test do
gem "capybara"
gem 'email_spec'
end
gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.3)
actionpack (= 4.0.3)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
activerecord (4.0.3)
activemodel (= 4.0.3)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.3)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
acts-as-taggable-on (3.1.1)
actionpack (>= 3, < 5)
activerecord (>= 3, < 5)
activesupport (>= 3, < 5)
addressable (2.3.6)
arel (4.0.2)
aws-sdk (1.38.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
bootstrap-sass (3.0.3.0)
sass (~> 3.2)
builder (3.1.4)
capistrano (3.0.1)
i18n
rake (>= 10.0.0)
sshkit (>= 0.0.23)
capistrano-bundler (1.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-rails (1.1.0)
capistrano (>= 3.0.0)
capistrano-bundler (>= 1.0.0)
capistrano-rbenv (2.0.1)
capistrano (~> 3.0)
sshkit (~> 1.3)
capybara (2.2.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chosen-rails (1.1.0)
coffee-rails (>= 3.2)
compass-rails (>= 1.1.2)
railties (>= 3.0)
sass-rails (>= 3.2)
chunky_png (1.3.0)
ckeditor (4.0.11)
mime-types
orm_adapter (~> 0.5.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.1.7)
compass (>= 0.12.2)
sprockets (<= 2.11.0)
devise (3.2.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
dumper (1.5.0)
multi_json (>= 1.0)
multipart-post (>= 1.1.5)
posix-spawn (>= 0.3.6)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
erubis (2.7.0)
exception_notification (4.0.1)
actionmailer (>= 3.0.4)
activesupport (>= 3.0.4)
execjs (2.0.2)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
faker (1.3.0)
i18n (~> 0.5)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
font-awesome-sass (4.0.3.1)
sass (~> 3.2)
friendly_id (5.0.3)
activerecord (>= 4.0.0)
fssm (0.2.10)
geocoder (1.2.0)
gibbon (1.1.2)
httparty
multi_json (>= 1.3.4)
gmaps4rails (2.1.2)
hashie (2.1.1)
hike (1.2.3)
httmultiparty (0.3.14)
httparty (>= 0.7.3)
mimemagic
multipart-post
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
i18n (0.6.9)
jbuilder (2.0.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7)
jwt (0.1.11)
multi_json (>= 1.5)
kaminari (0.15.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.2)
launchy (2.4.2)
addressable (~> 2.3)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mail_form (1.5.0)
actionmailer (>= 3.2, < 5)
activemodel (>= 3.2, < 5)
mime-types (1.25.1)
mimemagic (0.2.1)
mini_portile (0.5.3)
minitest (4.7.5)
multi_json (1.9.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.0)
net-ssh (>= 2.6.5)
net-ssh (2.8.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
orm_adapter (0.5.0)
paperclip (4.1.1)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
mime-types
pg (0.17.1)
polyglot (0.3.4)
posix-spawn (0.3.8)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.3)
actionmailer (= 4.0.3)
actionpack (= 4.0.3)
activerecord (= 4.0.3)
activesupport (= 4.0.3)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.3)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_layout (1.0.14)
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.0.3)
actionpack (= 4.0.3)
activesupport (= 4.0.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.0)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.5)
route_translator (3.2.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rspec-rails (2.14.2)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
simple_oauth (0.2.0)
soundcloud (0.3.2)
hashie (~> 2.0)
httmultiparty (~> 0.3.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sshkit (1.4.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
term-ansicolor
term-ansicolor (1.3.0)
tins (~> 1.0)
textacular (3.2.0)
activerecord (>= 3.0, < 4.2)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
tins (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
twitter (4.8.1)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
tzinfo (0.3.39)
uglifier (2.2.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.8.2)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
uuidtools (2.1.4)
warden (1.2.3)
rack (>= 1.0)
will_paginate (3.0.5)
will_paginate-bootstrap (1.0.0)
will_paginate (>= 3.0.3)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
acts-as-taggable-on
aws-sdk
bcrypt-ruby
bootstrap-sass (~> 3.0.3.0)
capistrano (~> 3.0.1)
capistrano-bundler
capistrano-rails (~> 1.1.0)
capistrano-rbenv (~> 2.0)
capybara
chosen-rails
ckeditor
coffee-rails
compass (= 0.12.2)
devise
dumper
email_spec
exception_notification
execjs
factory_girl_rails
faker
figaro
font-awesome-rails
font-awesome-sass (~> 4.0.2)
friendly_id
geocoder
gibbon
gmaps4rails
jbuilder
jquery-rails
json (= 1.7.7)
kaminari
mail_form
omniauth-facebook
paperclip
pg
rails (= 4.0.3)
rails_12factor
rails_layout
route_translator
rspec-rails
sass
sass-rails (~> 4.0.1)
sdoc
soundcloud
textacular
therubyracer
turbolinks
twitter
uglifier
unicorn
will_paginate-bootstrap (~> 1.0.0)
update2: If I clone the repo and bundle install, and the try to run rails s or any rake task, I replicate the bundler errors. However, if I then do gem install bundler and gem install rake, the new repo will work fine. Uninstalling and reinstalling the two gems in my original repo will not fix the issue. glad I've found a quasi fix, but would still like to get to the bottom of this.
update3: I think I've narrowed it down to an issue with the gems, but not sure how to proceed. If I run the commands that trigger errors using my default gemset, there is no issue, it's only when I switch over to the gemset for this project that I get errors. I did not run bundle update before testing commands with the default gemset.
update4: I've cloned the repo on another machine and it replicates the issue. So I'm guessing it's time to start going back and checking commits from before this issue and see what happens? My other idea is to start commenting out gems / removing dependencies and seeing if that helps. Anything else I might want to look at?
After removing all gems, the warning with uninitialized constant is still present.
These commands from the bundler FAQ did the trick:
#remove project-specific settings
rm -rf .bundle/
# remove project-specific cached gems and repos
rm -rf vendor/cache/
# remove the saved resolve of the Gemfile
rm -rf Gemfile.lock
and then rebundling with bundle install
edit: heroku deploy was also failing to start up because it starts the server with bin/rails s and my binstubs were all wonky. to fix this: BUNDLE INSTALL --BINSTUBS, again from bundler docs
I just removed the lock using rm -rf Gemfile.lock within my project directory's root folder, and re-ran bundle install and everything works perfect now.
I have problems like you, subscribe my case.
config/applicataion.rb:
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module AppName
class Application < Rails::Application
config.load_defaults 5.2
end
end
where require_relative 'boot' is very important, such as config/boot.rb:
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
has including bundler library into application.

Resources