Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack level too deep with ruby 2.1.0 #100

Open
mlyubarskyy opened this issue Mar 3, 2014 · 4 comments
Open

Stack level too deep with ruby 2.1.0 #100

mlyubarskyy opened this issue Mar 3, 2014 · 4 comments

Comments

@mlyubarskyy
Copy link

[15] pry(#Magick::ImageList)> show-method respond_to?
From: /Users/UGE/.rvm/gems/ruby-2.1.0/gems/rmagick-2.13.2/lib/RMagick.rb @ line 1799:
Owner: Magick::ImageList
Visibility: public
Number of lines: 9

def respond_to?(methID, priv=false)
  binding.pry
    return true if __respond_to__?(methID, priv)
    if @scene
        @images[@scene].respond_to?(methID, priv)
    else
        super
    end
end

[16] pry(#Magick::ImageList)> show-method __ respond_to __?

From: /Users/UGE/.rvm/gems/ruby-2.1.0/gems/rmagick-2.13.2/lib/rmagick.rb @ line 1799:
Owner: Magick::ImageList
Visibility: public
Number of lines: 9

def respond_to?(methID, priv=false)
  binding.pry
    return true if __respond_to__?(methID, priv)
    if @scene
        @images[@scene].respond_to?(methID, priv)
    else
        super
    end
end

this causes stack level too deep

@jorjordandan
Copy link

Is there a fix for this by any chance?

@mlyubarskyy
Copy link
Author

yep ))) this usually occurs when rmagick is required twice. try adding require: false in your Gemfile as fix

@jorjordandan
Copy link

Brilliant thanks!

@braincommerce
Copy link

Wow that's a crazy fix (which worked). In my Gemfile I only had 'rmagick' once but on OSX I had errors referencing the same file as both 'rmagick.rb' and 'Rmagick.rb. For me I'm on rails 4.1 and Ruby 2.0.0-p247 (via chruby)

/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:44: warning: already initialized constant Magick::PercentGeometry
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:44: warning: previous definition of PercentGeometry was here
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:45: warning: already initialized constant Magick::AspectGeometry
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:45: warning: previous definition of AspectGeometry was here
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:46: warning: already initialized constant Magick::LessGeometry
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:46: warning: previous definition of LessGeometry was here
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/RMagick.rb:47: warning: already initialized constant Magick::GreaterGeometry
/opt/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rmagick-2.13.2/lib/rmagick.rb:47: warning: previous definition of GreaterGeometry was here

Yet I only had in that directory:
RMagick.rb RMagick2.bundle rvg

So something is a bit funky with the filename case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants