You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently bumped a model of mine into a gem, which defines a class within a namespace as follows
module DE
class Criteria
...
end
end
I'm including this gem into my Rails 2 project, along with pry 0.10.1 and pry-stack_explorer 0.4.9.2. When I use my namespaced class in my car_critera.rb model as such:
class CarCriteria < DE::Criteria
...
end
On Rails application load, via console, I get the following load error, that seems to stem from pry-stack_explorer:
/Users/davidelner/.rvm/gems/ruby-1.9.3-p547@de-app/bundler/gems/rails-c51c00bb89b9/activesupport/lib/active_support/dependencies.rb:466:in `rescue in load_missing_constant': uninitialized constant PryStackExplorer::Criteria (NameError)
from /Users/davidelner/.rvm/gems/ruby-1.9.3-p547@de-app/bundler/gems/rails-c51c00bb89b9/activesupport/lib/active_support/dependencies.rb:462:in `load_missing_constant'
from /Users/davidelner/.rvm/gems/ruby-1.9.3-p547@de-app/bundler/gems/rails-c51c00bb89b9/activesupport/lib/active_support/dependencies.rb:106:in `const_missing_with_dependencies'
from /Users/davidelner/src/de/app/models/car_criteria.rb:1:in `<top (required)>'
It doesn't seem to play well with namespaced models sourced from a gem? Do you have any ideas how to handle this?
The text was updated successfully, but these errors were encountered:
It could be: I had assumed PryStackExplorer may have injected some constant lookup stuff to ActiveSupport, but I might be mistaken in this regard. Disabling the stack explorer gem allows the app to run without problems.
I recently bumped a model of mine into a gem, which defines a class within a namespace as follows
I'm including this gem into my Rails 2 project, along with pry 0.10.1 and pry-stack_explorer 0.4.9.2. When I use my namespaced class in my
car_critera.rb
model as such:On Rails application load, via console, I get the following load error, that seems to stem from pry-stack_explorer:
It doesn't seem to play well with namespaced models sourced from a gem? Do you have any ideas how to handle this?
The text was updated successfully, but these errors were encountered: