Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

[ERROR]: Stack level too deep problem #5296

Closed
lucienlo opened this issue Dec 31, 2016 · 8 comments · Fixed by #5298
Closed

[ERROR]: Stack level too deep problem #5296

lucienlo opened this issue Dec 31, 2016 · 8 comments · Fixed by #5298
Assignees

Comments

@lucienlo
Copy link

When I execute "bundle install" instruction, the console always displays it .

--- ERROR REPORT TEMPLATE -------------------------------------------------------

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command /usr/local/bin/bundle install

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what happened was...

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    I tried...

  • Have you read our issues document, https://github.com/bundler/bundler/blob/master/ISSUES.md?

    ...

Backtrace

SystemStackError: stack level too deep
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1511:in `rescue in add_bindir'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1503:in `add_bindir'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:358:in `files'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems.rb:1260:in `remove_unresolved_default_spec'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:45:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'

>>>Repeat much times.

/usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:415:in `gem'
  /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:46:in `require'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:179:in `install'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:20:in `dispatch'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:11:in `start'
  /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
  /usr/local/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:121:in `with_friendly_errors'
  /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
  /usr/local/bin/bundle:22:in `load'
  /usr/local/bin/bundle:22:in `<main>'

Environment

Bundler   1.13.7
Rubygems  2.6.8
Ruby      2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
Git       2.10.1 (Apple Git-78)
Platform  x86_64-darwin-16



Hope anyone can help me.... Thx very much.
@hmistry
Copy link
Contributor

hmistry commented Jan 1, 2017

Could you post your Gemfile so we can try to reproduce it?

@lucienlo
Copy link
Author

lucienlo commented Jan 1, 2017

That's my Gemfile

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins


Thx and have a happy new year

@Razcle
Copy link

Razcle commented Jan 2, 2017

I have a very similar issue but with a very slightly different environment:

Environment

Bundler   1.13.7
Rubygems  2.6.8
Ruby      2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Git       2.7.0
Platform  x86_64-darwin-15
Any help would be much appreciated

@hmistry
Copy link
Contributor

hmistry commented Jan 2, 2017

@Razcle This is a bug and it is being worked on. In the mean time, maybe you can try an older version of Bundler - v1.13.6 worked on my setup.

@Razcle
Copy link

Razcle commented Jan 3, 2017

@hmistry Thanks of the quick response. I tried again with v1.13.6 and got the following.

--- ERROR REPORT TEMPLATE -------------------------------------------------------

  • What did you do?

    I ran the command /usr/local/bin/bundler install

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what happened was...

Error details

SystemStackError: stack level too deep
  /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1506:in `block in add_bindir'
  /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1506:in `map'
  /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:1506:in `add_bindir'

repeated several times...

Environment

Bundler 1.13.6
Rubygems 2.6.8
Ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Git 2.7.0

Since then, I tried uninstalling everything and doing it again but these seems to have made the situation worse. No matter what I do, it seems to use Bundler version 1.13.7 even though I've uninstalled this?!

sorry If I'm missing something obvious, Im very new to this.

@hmistry
Copy link
Contributor

hmistry commented Jan 3, 2017

@Razcle If you want to run a specific version of bundler use bundle _1.13.6_ whatever_command will run v1.13.6.

Could you post your Gemfile so we can try to reproduce it.

@Razcle
Copy link

Razcle commented Jan 3, 2017

@hmistry Thanks again for the quick reply. Have tried with version 1.13.6 and get the same error.

here is my Gemfile:

source "https://rubygems.org"
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
#When you want to use a different version, change it below, save the
# file and run bundle install. Run Jekyll with bundle exec, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "3.3.1"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run bundle update github-pages.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end

@hmistry
Copy link
Contributor

hmistry commented Jan 3, 2017

@Razcle I can't reproduce your error... sorry I'm out of ideas (same ruby, bundler, ruby gem versions). See if you can have some one familiar with Ruby look at your setup.
Or maybe someone else here might have an idea regarding your error.

bundlerbot added a commit that referenced this issue Jan 4, 2017
[CLI] Dont override Kernel#gem for bundle gem

Should fix #5296

Since `Kernel#require` calls into `Kernel#gem` as an instance method on `self`, overriding the `gem` method can lead to bad things happening
segiddins pushed a commit that referenced this issue Jan 11, 2017
[CLI] Dont override Kernel#gem for bundle gem

Should fix #5296

Since `Kernel#require` calls into `Kernel#gem` as an instance method on `self`, overriding the `gem` method can lead to bad things happening

(cherry picked from commit 5135469)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants