Closed marcamillion closed 11 years ago
Not sure what the problem is, it works fine with 3.2.12.
You can see a working project: github.com/codetriage/codetriage
I'm wondering if another gem you've got loaded is monkey patching the singleton_class
method. Does it work in a fresh Rails 3.2.12 project?
That's the weird thing...this is a fresh Rails 3.2.12 project.
This is what my Gemfile looks like - https://gist.github.com/marcamillion/b34999069f88190017d3
The gem works in some of my other Rails 3.2.12 apps - they just have different gems and different versions of gems. Once I comment out sextant
though, I don't get that error - so something must be conflicting somewhere.
Let me know what else from the app you need to see.
bump Anything else that you need from me?
Run
$ bundle open sextant
Then open lib/sextant/engine.rb
and add this code:
puts method(:isolate_namespace).source_location.inspect
Right above
isolate_namespace Sextant
Then save the file, run rails s
and you should get an error along with the output from your puts. Paste the output back here.
This is the output:
["/.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/engine.rb", 379]
/.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/engine.rb:388:in `isolate_namespace': private method `singleton_class' called for Sextant:Module (NoMethodError)
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/sextant-0.2.3/lib/sextant/engine.rb:4:in `<class:Engine>'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/sextant-0.2.3/lib/sextant/engine.rb:2:in `<module:Sextant>'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/sextant-0.2.3/lib/sextant/engine.rb:1:in `<top (required)>'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/sextant-0.2.3/lib/sextant.rb:2:in `require'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/sextant-0.2.3/lib/sextant.rb:2:in `<top (required)>'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `require'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `each'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `block in require'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `each'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `require'
from /.rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.3.2/lib/bundler.rb:132:in `require'
from /Dropbox/Freelance_Projects/5K_MVP/bestofso/myapp/config/application.rb:14:in `<top (required)>'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /.rvm/gems/ruby-1.9.3-p392@myapp/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Replying from integrallis/stripe_event#11.
I'm able to reproduce the error with these steps: https://gist.github.com/invisiblefunnel/5148073. I did some guess and check work with the gems in @marcamillion's Gemfile which led me to serel
: https://github.com/thomas-mcdonald/serel/blob/1.1.1/lib/serel/exts.rb#L17-L21. I suggest opening an issue there.
But....the only gem that my app fails on is sextant - so I assume there must be something else happening.
Not quite sure what to open an issue and say, with Serel - since that's not where the error is pointing to.
if you comment out Serel
do you still get the error?
If you give me
puts method(:singleton_class).source_location
Bet it comes from Serel
...which is where the problem is...they redefined a core method
I commented out Serel, and I no longer have this issue.
So, now the question is...how do I report that?
Marc Gayle www.marcgayle.com www.twitter.com/marcgayle
On Tue, Mar 12, 2013 at 7:45 PM, Richard Schneeman <notifications@github.com
wrote:
if you comment out Serel do you still get the error?
If you give me
puts method(: singleton_class).source_location
Bet it comes from Serel...which is where the problem is...they redefined a core method
— Reply to this email directly or view it on GitHubhttps://github.com/schneems/sextant/issues/27#issuecomment-14815367 .
thanks @invisiblefunnel :heart:
My pleasure @schneems
So what's the next step?
Edit:
Actually...ignore that....I saw these notifications via Email and never saw the pull request by @invisiblefunnel on Serel.
Thanks much meng, really appreciate it.
Marc Gayle www.marcgayle.com www.twitter.com/marcgayle
On Wed, Mar 13, 2013 at 3:38 PM, Danny Whalen notifications@github.comwrote:
My pleasure @schneems https://github.com/schneems
— Reply to this email directly or view it on GitHubhttps://github.com/schneems/sextant/issues/27#issuecomment-14866983 .
Just installed sextant to my brand new Rails 3.2.12 project and when I restarted the server, I am getting this error:
How can I fix this?
Thanks.