search for: compute_type

Displaying 20 results from an estimated 27 matches for "compute_type".

2006 Jun 06
0
Scaffolding Extension - Polimorphic Associations
When I try to use it with polimorphic associations I get the following error In browse action: activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing'': uninitialized constant Privable activerecord-1.14.2/lib/active_record/base.rb:1246:in `compute_type'' activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'' (eval):1:in `compute_type'' -e:3 In show action: activesupport-1.3.1/lib/active_support/dependencies.rb...
2006 May 05
1
Help with ActiveRecord
...dated_on"=>nil, "action"=>nil, "type"=>nil, "post_id"=>nil, "mod_name"=>nil, "count"=>1, "user_id"=>nil, "comment"=>nil}, @new_record=true> >> AdminQueue.find(:all) SyntaxError: (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::0 ^ from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1244:in `compute_type'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/bas...
2006 Jul 08
1
Need Help Understanding Situation with Table Columns
...find_by_sql("select id, description from gmaps WHERE 1") pp results[0] pp(Gmap.columns_hash[''type'']) results end Note that I cannot get the ''find :all'' statement to work. It yields a failure: SyntaxError in City mapController#index (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::0 ^ C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1244:in `compute_type'' If I switch to my debug statements, when I do reference the ''type'' fi...
2006 Nov 26
5
associations help?
...:users, :through => :project_viewers, :uniq => true ... end Things appear to work ok until I go to destroy a User, at which point I get: ../activesupport/lib/active_support/dependencies.rb:399:in `to_constant_name'': Anonymous modules have no name to be referenced by (eval):1:in `compute_type'' Any help appreciated this fine Sunday! Thanks, s.ross -- View this message in context: http://www.nabble.com/associations-help--tf2708701.html#a7551954 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You rece...
2006 Jun 22
11
Help please
Getting this error: SyntaxError in CompanyController#positionslist (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::2 I could not find anything out about it (googling) and it''s not the clearest error message. Not sure if it''s related to an expected data type but that wouldn''t make sense. The only other thing...
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
...aine"}> >> f.symptoms NameError: c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0 /lib/active_support /dependencies.rb:89:in `const_missing'': uninitialized constant Symptoms from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor d/base.rb:1242:in `compute_type'' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0 /lib/active_suppo rt/dependencies.rb:120:in `const_missing'' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0 /lib/active_suppo rt/dependencies.rb:122:in `const_missing'' from (eval):1:i...
2006 Dec 14
3
Problem with ActiveRecord and Associations
...contact = Contact.find_by_sql(sql) contact[0].update_attribute(:delete_flag,''true'') end The if statement is correctly getting the correct count of children/detail recs, but the contact[0].update_attributes() is failing with the following ugly error: SyntaxError ((eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::0 ^): c:/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1244:in `compute_type'' c:/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:983:in `instan...
2009 Jun 23
2
syntax error, unexpected tINTEGER, expecting $end
...SyntaxError: compile error /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/base.rb:2203: syntax error, unexpected tINTEGER, expecting $end "95036 ^ from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/base.rb:2203:in `compute_type'' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/ active_record/base.rb:2200:in `compute_type'' from /...
2006 Dec 22
2
Relating Namespaced Models
...umentError: /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1.5618/lib/active_support/dependencies.rb:399:in `to_constant_name'': Anonymous modules have no name to be referenced by from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5618/lib/active_record/base.rb:1363:in `compute_type'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1.5618/lib/active_support/dependencies.rb:211:in `qualified_name_for'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1.5618/lib/active_support/dependencies.rb:470:in `const_missing''...
2007 Jun 18
0
Problem with belongs_to associations validating associated class: bug in rails in development mode?
...#{@reflection.class_name} expected, got #{record.class}" end (this validation is done on association_proxy.rb) So, to solve this problem you either set the cache_classes to true or change the @reflection.klass method to not cache the associated class: def klass active_record.send(:compute_type, class_name) end instead of : def klass @klass ||= active_record.send(:compute_type, class_name) end Is this a bug in rails? Pedro. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal...
2008 Nov 03
0
acts_as_rateable in rails 2.2.0
...teError (uninitialized constant <#object>::Rating) on line #10 of app/views/blah/blah.html.erb: /Library/Ruby/Gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:102:in `const_missing'' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/base.rb:2042:in `compute_type'' /Library/Ruby/Gems/1.8/gems/activesupport-2.2.0/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/active_record/base.rb:2038:in `compute_type'' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.0/lib/act...
2006 Jun 27
3
Weird ActiveRecord Foreign Key Problem
...s/activerecord-1.14.2/lib/active_record/base.rb:1244:in `instance_eval'' c:/programme/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1244:in `instance_eval'' c:/programme/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1244:in `compute_type'' c:/programme/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:983:in `instantiate_without_callbacks'' c:/programme/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/callbacks.rb:215:in `instantiate'' c:/programme/ruby/lib/ruby/gem...
2008 Oct 16
5
2 Models: Same name, different namespace => Problems
...ind(:first).comments.each do |c| %> <%= c.created_at %> <% end %> --- The following error arises: SQLite3::SQLException: no such column: comments.thing_id: SELECT * FROM "comments" WHERE ("comments".thing_id = 1) It happens because "ActiveRecord::Base.compute_type(''::Review::Comment'')" returns class "Comment" instead of class "Review::Comment". Additionally the following warning arises in the logs: .../vendor/rails/activerecord/lib/active_record/base.rb:1910: warning: toplevel constant Comment referenced by Review:...
2007 May 24
3
Annoying problem, stack error
...support/dependencies.rb:260:in `load_missing_constant'' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:468:in `const_missing'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1360:in `compute_type'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/reflection.rb:125:in `send'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/reflection.rb:125:in `klass'' from /usr/local/lib/ruby/gems/1.8/ge...
2011 Sep 08
1
Magic Multi Connections gem + Rails 3.1
...ncies.rb:550:in `[]'' from /Users/nopik/.rvm/gems/ruby-1.9.2-p180@christmas/gems/ activesupport-3.1.0/lib/active_support/dependencies.rb:595:in `constantize'' from /Users/nopik/.rvm/gems/ruby-1.9.2-p180@christmas/gems/ activerecord-3.1.0/lib/active_record/base.rb:1327:in `block in compute_type'' from /Users/nopik/.rvm/gems/ruby-1.9.2-p180@christmas/gems/ activerecord-3.1.0/lib/active_record/base.rb:1325:in `each'' from /Users/nopik/.rvm/gems/ruby-1.9.2-p180@christmas/gems/ activerecord-3.1.0/lib/active_record/base.rb:1325:in `compute_type'' from /Users/nopik/.r...
2006 Apr 22
6
STI and type tables?
So by default to get STI, I would have something like: create_table :items do |t| t.column "type", :string t.column "title", :string end But if I want to store those type values in a separate table, such that I have ... create_table :items do |t| t.column "item_type_id", :string t.column "title", :string
2006 May 17
10
Weird error
What does this mean? (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::0 ^ Anyone know? Any help counts! Thanks in advance, Mohammad(Programmer-22) -- Posted via http://www.ruby-forum.com/.
2006 Apr 13
2
One model won''t work like the others, generating weird error
...and adding in some custom controllers. I''m running Typo from trunk, so it''s using the version of rails in vendor/rails. Everything is going smoothly...until now. I have one model that JUST. WON''T. WORK. Whenever I call it, I get the following error: (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::2 The model itself couldn''t be any simpler: class Team < ActiveRecord::Base end The controller calling it is as follows: class RostersController < ContentController layout :theme_layout helper :artic...
2006 Mar 27
2
:through and STI
...;' from (eval):1:in `instance_eval'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/base.rb:1197:in `instance_eval'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/base.rb:1197:in `compute_type'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:112:in `send'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.rb:112:in `klass'' from ./script/../con...
2007 Aug 15
2
has_many :through ... What am I missing?
...this error: NameError: uninitialized constant Ladder::Users from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:477:in `const_missing'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/base.rb:1360:in `compute_type'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/reflection.rb:125:in `send'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/reflection.rb:125:in `klass'' from /opt/local/lib/ruby/gems/1.8/...