Description
An unexpected error occurs (e.g: NoMethodError undefined method `map' for nil:NilClass) When managing Ruby application's gem dependencies with bundler On Artifactory 6.7.0.
Steps to reproduce
$ bundle install --path ./test/bundle --verbose
If you need to re-run above command with change of Gemfile as following, you need to delete Gemfile.lock which will be created only in case gems are installed successfully.
1) When source indicate to gems-local
Gemfile
~~~~~~~
source 'https://rubygems.org/'
source 'http://127.0.0.1:8081/artifactory/api/gems/gems-local/'
gem 'sfn'
~~~~~~~~
==> this will works
Bundle complete! 1 Gemfile dependency, 39 gems now installed.
Bundled gems are installed into `./test/bundle`
You may need to delete Gemfile.lock at this time.
2) When source indicate to gems-remote
Gemfile
~~~~~~~
source 'https://rubygems.org/'
source 'http://127.0.0.1:8081/artifactory/api/gems/gems-remote/'
gem 'sfn'
~~~~~~~
==> This will fail due to remote repo of gems-remote as following errors.
Retrying dependency api due to error (2/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying dependency api due to error (3/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying dependency api due to error (4/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying fetcher due to error (2/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
3) When source pointing to virtual repo such as gems
Gemfile
~~~~~~~
source 'https://rubygems.org/'
source 'http://127.0.0.1:8081/artifactory/api/gems/gems/'
gem 'sfn'
~~~~~~~
==> This will fail due to remote repo in side of gems virtual repository
Retrying dependency api due to error (2/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying dependency api due to error (3/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying dependency api due to error (4/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Retrying fetcher due to error (2/4): NoMethodError undefined method `map' for nil:NilClass
Did you mean? tap
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
- duplicates
-
RTFACT-18388 Bundle install failed when using local repository through a virtual repository
- Done
- is duplicated by
-
RTFACT-18388 Bundle install failed when using local repository through a virtual repository
- Done
-
RTFACT-18526 Ruby gems dependency error with Bundler
- Done
- relates to
-
RTFACT-13635 Artifactory resets the connection when accessing '/versions' api on rubygems
- Done