Skip to content
New issue

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

Raise "can't modify frozen object" with irregular model in Rails 4 #36

Closed
nengxu opened this issue Dec 6, 2013 · 5 comments
Closed

Comments

@nengxu
Copy link

nengxu commented Dec 6, 2013

Tried both on 0.1.31 and 0.9.0.pre, on Rails 4.0.0.

With an irregular model, like this:

class Basetrx < ActiveRecord::Base
  establish_connection :trx
  self.table_name = 'basetrx'
  self.primary_key = :id

The normal find method

Basetrx.find(t_id)

will raise "can't modify frozen object" error, with the trace:

rack-mini-profiler (0.1.31) Ruby/lib/patches/sql_patches.rb:148:in `instance_variable_set'
rack-mini-profiler (0.1.31) Ruby/lib/patches/sql_patches.rb:148:in `send_query_prepared'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:776:in `exec_cache'
@SamSaffron
Copy link
Member

can you try again on 0.9.0 ?

@jamilabreu
Copy link

A quick reference to the old repo, where some are still posting about this: SamSaffron/MiniProfiler#106

@steakchaser
Copy link

I'm seeing this in rails 3.2.14 with 0.9.0.pre. There's nothing special in any of my models; find simply just stops working. The error started popping up and goes away when I revert the following version bumps:

  • compass-rails 1.0.3 -> 1.1.6
  • sass 3.2.1 -> 3.3.2
  • compass 0.12.2 -> 1.0.0.alpha.18

@SamSaffron
Copy link
Member

This should be fixed now. Try latest

@narinari
Copy link

👍 Thank you!

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

No branches or pull requests

5 participants