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 to deep #86

Closed
pointblack opened this issue May 15, 2013 · 4 comments
Closed

Stack level to deep #86

pointblack opened this issue May 15, 2013 · 4 comments

Comments

@pointblack
Copy link

With the change from Rails 3.1.10 to Rails 3.2.13 i get following error when trying to run specs:

/.rvm/gems/ruby-1.8.7-p334@riptide/gems/transitions-0.1.8/lib/active_model/transitions.rb:34:in `old_transitions_initialize': stack level too deep (SystemStackError)

from /.rvm/gems/ruby-1.8.7-p334@riptide/gems/transitions-0.1.8/lib/active_model/transitions.rb:36:in `initialize'
from /.rvm/gems/ruby-1.8.7-p334@riptide/gems/transitions-0.1.8/lib/transitions.rb:45:in `new'
from /.rvm/gems/ruby-1.8.7-p334@riptide/gems/transitions-0.1.8/lib/transitions.rb:45:in `state_machine'

Im using Rails 3.2.13 and Transitions gem 0.1.8

StateMachine is defined as following in the model:

  state_machine do
    state :pending
    state :accepted
    state :terminated
    event :accept do
      transitions :to => :accepted, :from => :pending
    end
    event :terminate do 
      transitions :to => :terminated, :from => [:pending, :accepted]
    end
  end
@troessner
Copy link
Owner

Interesting. Please have a look at this issue: #83
Looking at what you posted above (apparently you're still on 1.8.7), it seems like this could indeed have something to do with the ruby version.

Could you try to reproduce this on ruby 1.9.3 or 2.0?

@pointblack
Copy link
Author

yes i can cofirm with the update to ruby 1.9.3 its working

@troessner
Copy link
Owner

Thanks, good to know. Here's the thing though: I am extremely hesitant to fix something which is specific to a ruby version which will soon not be supported anymore. I'd rather mark the gem as not compatible with 1.8.7.
Can you switch to ruby 1.9 / 2.0 or do you have to stick with 1.8?

@troessner
Copy link
Owner

Closing this. I'd be accepting pull request fixing this but I won't spend time on fixing errors that only occur on outdated ruby versions. I added a corresponding compatibilty section to our documentation.

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

2 participants