Questions tagged [stack-level]

18 questions
10
votes
1 answer

Ruby stack level too deep exception NOT from recursive infinite loop

EDIT : (SOLVED) actually it probably was raised BECAUSE OF an infinite loop I was coding and after adding a method I got this : user_name@the_computer:/media/ECC3-C3B0/Prog/mts/src/mts$ rake test --trace ** Invoke test (first_time) ** Execute…
ergo sum cogito
  • 158
  • 1
  • 7
4
votes
1 answer

How to get current stack level

Can I get current level of stack in Ruby? Currently I use caller.size which is ok, but looks not native
fl00r
  • 82,987
  • 33
  • 217
  • 237
4
votes
0 answers

Stack level too deep randomly in production only

My production evnvironment every so often throws out a stack level too deep error. The whole thing is life and you can take a look at it here: http://88.198.198.46/pages/offers The first time it might work, but after the second or third refresh…
2
votes
0 answers

Stack level too deep error in ruby native extension, how to reduce stack level?

I have a Ruby on Rails api which handles a simple API call and returns some encrypted data. The encryption is done in C++, using the ruby native C api. (reference here). The native part works fine when compiled and linked as a standalone program,…
Vincent
  • 185
  • 1
  • 11
1
vote
1 answer

stack level too deep in Rails 2.3.5

I am getting an error like this Exception Traces: --> stack level too deep --> /var/www/html/mysite.com/mysiteweb/mysite/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb:86:in `include?' -->…
Amal Kumar S
  • 15,555
  • 19
  • 56
  • 88
1
vote
1 answer

Debugging a stack level too deep error - Ruby

I am building a Tic Tac Toe game in which the user can play a computer, or computers can play each other. While building the AI I am running into the below error. How can I debug this? I understand it is to do with a loop somewhere but I can't find…
Matt Hough
  • 1,049
  • 2
  • 13
  • 27
1
vote
2 answers

Rails: before_save - Stack level too deep

I have this simple model: class Post < ApplicationRecord after_create_commit :process before_save :re_process, on: :update has_one :processed, class_name: 'Post::Process' def process self.processed.destroy if…
heroxav
  • 1,387
  • 1
  • 22
  • 65
1
vote
1 answer

SystemStackError - Stack Level Too Deep

I know there are a lot of System Stack Error Questions on here... but everyone of the questions and answers are Unique. and haven't found one that is close to mine. I really don't see why i am getting this error... I dont need a view because form…
Big Al Ruby Newbie
  • 834
  • 1
  • 10
  • 30
1
vote
1 answer

Stack level too deep when compiling javascript files on ElasticBeanstalk Ruby2.0 on Rails3

I'm trying to migrate our Rails3 app from old ElasticBeanstalk environment running Ruby 1.9.3 to new one running Ruby 2.0. Everything seems to work fine except "stack level too deep" error on assets precompile javascript files (css compiling worked…
1
vote
2 answers

Stack level too deep in Ruby trying to draw a random card

I'm getting an error "stack level too deep" running the code below. If the random card picked is not there it picks another random card. I suppose I should chance the code somehow, but I'm not sure how. Any suggestions? def hit …
Spike Fitsch
  • 747
  • 1
  • 7
  • 12
0
votes
0 answers

Stack level too deep on upgrading rails 3.1.10 to 3.2.0

I am getting the following errors after upgrading my rails application from 3.1.10 to 3.2.0. rails console is opening fine. And, I am able to execute code in console. However, When I run rails server and open page in browser. It fails and shows the…
0
votes
0 answers

Ruby on Rails -- SystemStackError: stack level too deep

I added some after create do and before update do code to my model and now I cant save my posts btw both models(user & posts) have a has_and_belongs_to_many relationship: after_create do @post = Post.find(self.id) for user in …
user6059539
0
votes
1 answer

Why the program pass all tests if I use regular if statement in the method but says `stack level too deep` when using a ternary operator instead?

I was working on coding challenge called Robot name. I also had tests for that. The program passed all the tests. The code is below.. class Robot attr_accessor :name @@robots = [] def initialize @name = self.random_name @@robots <<…
buterfly85
  • 163
  • 3
  • 11
0
votes
1 answer

random stack level too deep (SystemStackError)

I have been running into a strange gremlin of sorts in my code as of late. Randomly it will dump a "stack level too deep (SystemStackError)" error on a piece of code that has previous, sometimes moments before, been working. I have read through the…
CMESSEY
  • 17
  • 2
0
votes
0 answers

Ruby on Rails 3: 1x Circular Method Returning Stack Level Too Deep

For summary, I have a blog_posts controller. The blog_posts controller functions mostly as normal CRUD. However, in the model, I record the state of blog_posts. So a user can post an entry, but it won't be in an Active state, which means no one can…
miler350
  • 1,411
  • 11
  • 15
1
2