Problem with zeus and rollbar
bradx3 opened this issue · 5 comments
I'm using rollbar 0.9.3 and zeus 0.13.3. The zeus server fails to start up and I end up with the error below. #25 mentioned adding "require 'rake'" to spec_helper, but this is failing in dev and test environments.
Adding require 'rake' to various points in our app load didn't seem to help, but ultimately I've been able to fix the problem by adding this line to the top of rollbar/rake.rb:
require 'rake/application'
Now obviously that isn't really getting to the bottom of this issue, so I'll keep doing some research into this, but figure there's no harm opening up a ticket in case somebody else comes across the same problem.
zeus c ruby-1.9.2-p320@readingeggs(11:34 am 15-03-13)
/Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/rollbar-0.9.3/lib/rollbar/rake.rb:5:in `alias_method': undefined method `display_error_message' for class `Rake::Application' (NameError)
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/rollbar-0.9.3/lib/rollbar/rake.rb:5:in `<class:Application>'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/rollbar-0.9.3/lib/rollbar/rake.rb:4:in `<module:Rake>'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/rollbar-0.9.3/lib/rollbar/rake.rb:3:in `<top (required)>'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/rollbar-0.9.3/lib/rollbar.rb:18:in `<top (required)>'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:72:in `require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:70:in `each'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:70:in `block in require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:59:in `each'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler/runtime.rb:59:in `require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/bundler-1.3.3/lib/bundler.rb:132:in `require'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus/rails.rb:95:in `default_bundle'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:166:in `run_action'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:54:in `block in go'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:7:in `features_loaded_by'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:53:in `go'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (3 levels) in go'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:78:in `fork'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:78:in `block (2 levels) in go'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:73:in `each'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:73:in `block in go'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:62:in `loop'
from /Users/brad/.rvm/gems/ruby-1.9.2-p320@readingeggs/gems/zeus-0.13.3/lib/zeus.rb:62:in `go'
Thanks Brad. What version of Rake do you have installed?
I tried installing zeus 0.13.3 and rollbar 0.9.3, but it worked fine. Was able to start up the zeus server, run zeus rake rollbar:test
, zeus server
, etc.
Rake 10.0.3
Looking at the rake source, it looks to me like require "rake" should be requiring rake/application. Weird zeus stuff going on here I think 😦
Hm, yeah. Rake 10.0.3 here as well.
Ok the solution on our end seemed to be to explicitly add rake to our gemfile.
I guess we were just relying on other gems to pull it in before. Adding it explicitly ensures it's loaded and ready to go by the time rollbar needs it.
Thanks for your help @brianr
Interesting. Nice find. I'll add a note in the readme.