-
Notifications
You must be signed in to change notification settings - Fork 92
BUG: unitialized constant Analytical::Modules::Production #30
Comments
The other way to fix is to add another environment setting (it can be empty): development: That seemed to fix it for me as well and actually handle environments correctly. |
The actual bug here is that the gem is trying to use a module named |
Sorry, should have added the solution: The solution is to capitalize your YAML keys exactly the same way the ruby modules are capitalized. Here's an example
At that point, maybe you should catch the NameError, tell the users they tried to configure something that doesn't exist, and give them a list of valid module names? |
@indirect
I'm suspecting it might be @shiftbs quick fix that is actually at work here. |
Yes, I'm completely positive, because I wrote a patch that fixes it and submitted it as a pull request. :) On Jan 27, 2012, at 2:07 AM, redbar0nreply@reply.github.com wrote:
|
Ah, sweet. :-) It's still mysterious to me though how it worked for me when I removed the whitespaces, while having the same capitalization.. |
Hey,
I discovered a really annoying bug when you create the analytical.yml file exactly according to the readme, like this:
production:
google:
key: UA-5555555-5
clicky:
key: 55555
This will give the error:
uninitialized constant Analytical::Modules::Production
or
uninitialized constant Analytical::Modules::Kissmetrics
when calling the "analytical" helper from a controller or a view.
The error is resolved when removing the space before the API-keys, so the file looks like this:
production:
google:
key:UA-5555555-5
clicky:
key:55555
This is a very annoying bug, since it's almost impossible to detect.
I hope you're able to fix it soon.
PS: I would suggest to update the Readme in the meanwhile, so more people don't unnecessarily run into it by following the setup procedure there.
Cheers.
The text was updated successfully, but these errors were encountered: