We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For most parts of my rails application cache-money works really nice.
But how do I solve this error. Without cache-money I do not have this error: (Is there a way to disable cache-money for a certain model?)
NoMethodError (undefined method <=>' for #<UserActivity:0x1072c9b58>): /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:124:inadd_object_to_cache' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:123:in sort' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:123:inadd_object_to_cache' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:161:in update_index_with_minimal_network_operations' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:31:inupdate' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:ineach' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:48:insend' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:48:in unfold' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:26:inupdate_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/transactional.rb:13:intransaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:319:intransaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:141:in trace_execution_scoped' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:314:intransaction' app/models/user_activity.rb:126:in generate_html' app/models/user_activity.rb:108:increate_html' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/transactional.rb:13:intransaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:319:intransaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:141:in trace_execution_scoped' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:314:intransaction' app/models/activity.rb:151:in `log'
<=>' for #<UserActivity:0x1072c9b58>): /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:124:in
sort' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:123:in
update_index_with_minimal_network_operations' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:31:in
update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in
update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:48:in
unfold' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:26:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/transactional.rb:13:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:319:in
trace_execution_scoped' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:314:in
generate_html' app/models/user_activity.rb:108:in
The text was updated successfully, but these errors were encountered:
I have same bug, maybe it ocurrs in a callback?
Sorry, something went wrong.
same here. Even after removing c-m indices from model! Please help.
You must define <=> for ActiveRecord::Base, i do it in cache_money initializer:
class ActiveRecord::Base is_cached :repository => $cache def <=>(other) self.id <=> other.id end end
No branches or pull requests
For most parts of my rails application cache-money works really nice.
But how do I solve this error. Without cache-money I do not have this error:
(Is there a way to disable cache-money for a certain model?)
NoMethodError (undefined method
<=>' for #<UserActivity:0x1072c9b58>): /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:124:in
add_object_to_cache'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:123:in
sort' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:123:in
add_object_to_cache'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:161:in
update_index_with_minimal_network_operations' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/index.rb:31:in
update'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in
update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in
each'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:60:in
update_caches' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:48:in
send'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:48:in
unfold' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/write_through.rb:26:in
update_caches'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/transactional.rb:13:in
transaction'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:319:in
transaction'/Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:141:in
trace_execution_scoped' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:314:in
transaction'app/models/user_activity.rb:126:in
generate_html' app/models/user_activity.rb:108:in
create_html'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cash/transactional.rb:13:in
transaction'/Library/Ruby/Gems/1.8/gems/af-cache-money-0.2.10/lib/cache_money.rb:52:in
transaction_without_trace_ActiveRecord_self_name_transaction' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:319:in
transaction'/Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:141:in
trace_execution_scoped' /Library/Ruby/Gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:314:in
transaction'app/models/activity.rb:151:in `log'
The text was updated successfully, but these errors were encountered: