I am developing two gems side-by-side, one that contains some pure ruby functionality and one with an interface for Rails.
The Rails gem (rwanda-rails) depends on the pure Ruby gem (rwanda) with spec.add_runtime_dependency "rwanda" "~> 0.6.0"
in the .gemspec. However, for some reason bundler can't find this new version -- although I can install it with gem install
:
15:40 slack@kevin:~/rails/rwanda-rails[master]$ gem install rwanda
Successfully installed rwanda-0.6.0
Parsing documentation for rwanda-0.6.0
Done installing documentation for rwanda after 0 seconds
1 gem installed
15:48 slack@kevin:~/rails/rwanda-rails[master]$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rwanda~> 0.6.0":
In Gemfile:
rwanda-rails (>= 0) ruby depends on
rwanda~> 0.6.0 (>= 0) ruby
Could not find gem 'rwanda~> 0.6.0 (>= 0) ruby', which is required by gem 'rwanda-rails (>= 0) ruby', in any of the sources.
Confirm that rwanda
is installed:
15:50 slack@kevin:~/rails/rwanda-rails[master]$ gem list
*** LOCAL GEMS ***
[...]
rwanda (0.6.0)
Bundler is configured to install gems in ~/vendor/bundle/
:
15:50 slack@kevin:~/rails/rwanda-rails[master]$ ls -1 ~/vendor/bundle/gems/
[...lots of gems...]
rwanda-0.4.0
rwanda-0.5.3
rwanda-0.6.0
I guess I'm confused about where bundler is installing its gems and why it can't find a gem that seems to be available.
I'm using ruby 2.2.1, set via a .ruby-version in the gem's directory. $GEM_PATH and $GEM_HOME are not set (should they be? does rbenv take care of that?).
I also installed and then removed rbenv-bundler (after finding the warnings from the rbenv developers) and am worried that it might have left something behind that is interfering?
I have three plugins installed for rbenv: binstubs, gem-rehash and ruby-build.
I've also tried rbenv rehash
, bundle install --binstubs
and bundle update
(which fails with the same message as bundle install
.