Gemfile error when deploying GitHub repo to Heroku - ruby

I'm trying to push my GitHub repo to Heroku.
Apparently my Gemfile is incorrect. I've checked it twice, and find no typos or anything, but it complains about rb-inotify being added and removed.
Here's the log:
Ruby app detected
Compiling Ruby
Using Ruby version: ruby-2.2.4
Installing dependencies using bundler 1.11.2
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 added to the Gemfile:
* rb-inotify
You have deleted from the Gemfile:
* rb-inotify
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 added to the Gemfile:
* rb-inotify
You have deleted from the Gemfile:
* rb-inotify
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app

Related

Can't run bundle install: Bundler could not find compatible versions for gem "bundler"

I'm trying to run bundle install, but I keep getting this error:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 2.1.4)
Current Bundler version:
bundler (2.2.29)
Your bundle requires a different version of Bundler than the one you're running.
Install the necessary version with `gem install bundler:2.1.4` and rerun bundler
using `bundle _2.1.4_ install`
Tried an update and cleanup. Nothing has worked. Had tons of issues like this ever since updating to Catalina.

bundler no longer vendoring gem

I have a gem that is a reference to a private repo that I use. I reference it in my gem file like this:
gem 'google', git: 'git#github.com:radiumsoftware/google.git'
and in my Gemfile.lock the dependency looks like this:
GIT
remote: git#github.com:radiumsoftware/google.git
revision: dff0e3dcddbfd74967b3a0f954922fd3592b5101
specs:
google (0.3.0)
activesupport
faraday (~> 0.8.0)
faraday_middleware
mail-xoauth
multi_json
nokogiri
The gem had previously been vendoring, that is it was in my vendor/cache.
I updated the repo for this Gem and changed to the revision to the new commit but after running bundle install or even bundle update, the gem had moved from vendor/cache to the rvm gems folder.
Can anyone explain why? I am running:
bundler 1.6.2
ruby 2.0.0p353
Run bundle package --all to include git (and path) gems in vendor/cache.
http://bundler.io/man/bundle-package.1.html#GIT-AND-PATH-GEMS

Bundler could not find gem in any of the sources

I was trying to run Middleman and am getting the following error:
$ middleman
WARN: Unresolved specs during Gem::Specification.reset:
thor (< 2.0, >= 0.15.2)
multi_json (~> 1.0)
rb-inotify (>= 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Could not find i18n-0.6.1 in any of the sources
Run `bundle install` to install missing gems
So I ran bundle install and here's the relevant part of the output:
$ bundle install
Using i18n (0.6.1)
...
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
$ middleman
...
Could not find i18n-0.6.1 in any of the sources
Run `bundle install` to install missing gems.
$ bundle show
Gems included by the bundle:
...
* i18n (0.6.1)
...
$ bundle show i18n
/Users/jh/Documents/Workspace/mywebsite-middleman/vendor/bundle/ruby/1.8/gems/i18n-0.6.1
Does anybody know what's going on here? I keep running bundle install and bundle install --deployment like the message says and it refuses to work.
It sounds like you have added the middleman gem to a Gemfile and have installed using bundle install.
If that is the case you should run middleman as bundle exec middleman. This will ensure that all the other gems which have been installed as part of bundle install will be available to middleman.

How to set bundler version in heroku?

I need to specific the ruby version in my gemfile but my app in heroku is using the old bundler version 1.0.7.
If I include gem 'bundler', '1.3.2' in my gemfile it failed when I push to heroku.
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (= 1.3.2)
Current Bundler version:
bundler (1.0.7)
Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.
I also try running heroku run "gem install bundler" and it return permission error.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/ruby1.9.2/lib/ruby/gems/1.9.1
directory.
How can i set the Bundler version to 1.3.2 in heroku so that I can specific ruby version?
Heroku manages bundler as part of stack. I'm guessing you are on the Bamboo stack as that uses 1.0.7 whereas Cedar is using 1.3.x version.
If you're on Bamboo then you don't have any options I'm afraid, aside from upgrading to Cedar where you will get all the latest goodness.

Heroku Deploy can't find devise-1.4.6

Trying to deploy to Heroku but get the following error:
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for http://rubygems.org/
Could not find devise-1.4.6 in any of the sources
FAILED: http(preventing hyperlink)://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
I have "gem 'devise'" in my gem file, have "source 'http://rubygems.org'" at the top, and have run both bundle install and bundle update. Not sure why Heroku is looking for 1.4.6. Any ideas?
Thanks!
John
Here is the gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'devise'
gem 'sqlite3', '1.3.3', :group => :development
Looks like devise 1.4.6 is no longer at Rubygems.com: http://rubygems.org/gems/devise/versions
I tried using devise 1.4.5, but it didn't work either.
You need to update the locked version of Devise in your Gemfile.lock.
$ bundle update devise
Then commit, push and deploy to Heroku.

Resources