zevarito/mixpanel — Issue #25: Unable to setup the mixpanel gem correctly
Author: mixellent
Created: 2012-02-06 10:49:43+00:00
State: open

I would really like to get Mixpanel to work on my rails app setup, but so far no luck. I may be missing something trivial here.

I have added the following code as suggested, to my config/environment.rb file:

Rails::Initializer.run do |config|
config.middleware.use "Mixpanel::Tracker::Middleware", "MY_TOKEN_HERE", :async => true
end

Every time I try to run rails server, I get the following error:

': uninitialized constant Rails::Initializer (NameError)

I am using Rails 3.1.1

Thanks,

Michael