Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

ActiveRecordAdapter, rails 2.3.8, missing constant VanityMetricValue! #102

Closed
sabotatore opened this issue Apr 2, 2012 · 5 comments
Closed
Labels

Comments

@sabotatore
Copy link

I tried to use vanity with rails 2.3.8 and mysql adapter.

When I call track! helper, I get error:

"Vanity::Adapters::ActiveRecordAdapter is not missing constant VanityMetricValue!"
/rails_app/vendor/rails/activesupport/lib/active_support/dependencies.rb:417:in load_missing_constant' /rails_app/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:inconst_missing'
/rails_app/vendor/rails/activesupport/lib/active_support/dependencies.rb:98:in rescue in const_missing' /rails_app/vendor/rails/activesupport/lib/active_support/dependencies.rb:95:inconst_missing'
/rails_app/vendor/rails/activerecord/lib/active_record/base.rb:1:in block in compute_type' /rails_app/vendor/rails/activerecord/lib/active_record/base.rb:2232:inclass_eval'
/rails_app/vendor/rails/activerecord/lib/active_record/base.rb:2232:in block in compute_type' /rails_app/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:insilence_warnings'
/rails_app/vendor/rails/activerecord/lib/active_record/base.rb:2230:in compute_type' /rails_app/vendor/rails/activerecord/lib/active_record/reflection.rb:156:inklass'
/rails_app/vendor/rails/activerecord/lib/active_record/reflection.rb:187:in quoted_table_name' /rails_app/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:97:inconstruct_sql'
/rails_app/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:21:in initialize' /rails_app/vendor/rails/activerecord/lib/active_record/associations.rb:1306:innew'
/rails_app/vendor/rails/activerecord/lib/active_record/associations.rb:1306:in block in collection_reader_method' /home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/adapters/active_record_adapter.rb:115:inblock in metric_track'
/home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/adapters/active_record_adapter.rb:114:in each' /home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/adapters/active_record_adapter.rb:114:ineach_with_index'
/home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/adapters/active_record_adapter.rb:114:in metric_track' /home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/metric/base.rb:140:intrack!'
/home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/playground.rb:217:in track!' /home/vitali/.rvm/gems/ruby-1.9.2-p290@shoedazzle/gems/vanity-1.8.0/lib/vanity/helpers.rb:59:intrack!'

@phillbaker
Copy link
Collaborator

Hi @sabotatore, thanks for the bug report. I know this is an old bug, but I'll be helping to clean up vanity's backlog over the next few weeks. You reported this bug with Rails 2.3, are you still actively using 2.3? I'm leaning toward removing Rails 2.3 support in version 1.9 because it's no longer officially supported and other feature/bug fixes look to be higher value (like ruby2.0 and rails 4 support).

If you'd like to contribute a fix for this bug, I'd be happy to release a point release on the gem's 1.8.x to fix this.

@troy
Copy link

troy commented Feb 14, 2014

Does this mean this bug isn't going to get fixed, short of a surprise user-contributed PR? From the pending PRs, it looks like removing Rails 2.3 is more likely. Thanks either way.

@phillbaker
Copy link
Collaborator

@troy that's correct - this bug is probably going to stay unfixed unless you/a kind soul contributes the PR. Most of my work on this gem in the coming weeks will be trying to remove rails2/ruby1.8.7.

I will keep around a v1.9-stable branch where a patch could be applied, and I'll be willing to release 1.9.x versions with patches, if that helps. Are you interested in a patch?

@troy
Copy link

troy commented Feb 14, 2014

@phillbaker thanks! I don't know the codebase and didn't intend to learn it, so I'm not the right person to submit a PR for this. I'm trying to do some A/B testing (yeah, an actual end user!) and figuring out what my options are. split and vanity came up.

@phillbaker
Copy link
Collaborator

Closing as per dadd357 support for rails 2 in master is dropped.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants