Bug 1007631
Summary: | require 'ammeter/init' fails | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ken Dreyer <ktdreyer> |
Component: | rubygem-ammeter | Assignee: | Josef Stribny <jstribny> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | bkabrda, hhorak, jstribny |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-04-07 07:39:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ken Dreyer
2013-09-13 02:34:03 UTC
Hi, you need to require 'rails' since the file you mentioned [1] relies on the Rails VERSION constant as requiring 'ammeter' already does [2]. Monkey patch is a bad idea, rubygem-ammeter has rubygem-railties as a dependency. Just require Rails before 'ammeter/init' or require 'ammeter' instead. The order of requires should be probably changed in ammeter/init.rb so that rails requirement comes first. I filled the pull request to upstream[3]. [1] https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/example/rails_example_group.rb#L10 [2] https://github.com/alexrothenberg/ammeter/blob/master/lib/ammeter.rb [3] https://github.com/alexrothenberg/ammeter/pull/22 Cool, thanks. On acts-as-taggable-on's side, do you think it would be appropriate for acts-as-taggable-on to first try loading "ammeter/init", catch the LoadError, and then try "ammeter"? Well, I am not sure. First of all it might be that upstream now prefers requiring just 'ammeter'. If the test suite works with requiring 'ammeter', I would change that line to load ammeter (using sed for example). You can change it back in the spec file when it's fixed and you know that upstream of acts-as-taggable-on continue to use it and that it has been fixed. I was wondering if the ammeter upstream developer has altered his preference for "ammeter" vs "ammeter/init". If that's the case, how can we make ammeter consumers (like acts-as-taggable-on) be forwards- and backwards- compatible? Unfortunately upstream is sort of unresponsive in this matter. It's probably not a bug from their point of view. Please require just 'ammeter' for now. Thanks Josef. And just to close the loop as far as acts-as-taggable-on is concerned, upstream has removed the dependency on ammeter. |