search for: activerecord

Displaying 20 results from an estimated 6357 matches for "activerecord".

2008 Mar 07
3
Boolean circles..
...logo: nil, currently_active: 1, created_at: "2008-03-07 12:52:35", updated_at: "2008-03-07 12:52:35"> >> m = c.members.find(:first, :conditions => "is_active = 1") => nil >> m = c.members.find(:first, :conditions => "is_active = true") ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: true: SELECT * FROM members WHERE (members.club_id = 1 AND (is_active = true)) LIMIT 1 from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `log'' from /Library/Rub...
2005 Dec 01
0
symlink and 0.14.3
...====================================== Mysql::Error in Admin/manufacturers#index Access denied for user: ''@localhost'' (Using password: NO) RAILS_ROOT: /home/httpd/htdocs/ujautoszalon2/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/vendor/mysql.rb:510:in `read'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/vendor/mysql.rb:152:in `real_connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.0.2969/lib/active_record/connection_adapters/mysql_adapter.rb:41:i...
2006 Aug 15
0
SystemStackError: stack level too deep
Hi I have two models Keyword and KeywordResult, they basically look like this: class KeywordResult < ActiveRecord::Base belongs_to :keyword validates_presence_of :title, :url, :keyword_id end class Keyword < ActiveRecord::Base has_many :keyword_results, :dependent => :delete_all acts_as_tree :order => "text", :foreign_key => "top_keyword" end Before you ask: I commented al...
2009 Feb 02
9
ActiveRecord Unexplainable SystemStackError - Only in WEBrick
This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can''t reproduce it with any tests. It is caused by calling the "missing" id method (base.rb:2435) on my ActiveRecord class. WEBrick and my tests are running as the same user, with a `ulimit -s` of 10240. Plus the query works sometimes so I don''t think this matters. Here''s the trace: /usr/lib/ruby/1.8/set.rb:93:in `empty?'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_reco...
2008 Dec 20
9
Upgrade to Rails 2 - problem with "save" (MySQL boolean issue?)
I have been working through an upgrade of my 1.2.6 application to 2.2.2. I am almost there but I have hit a problem with ActiveRecord. Before the upgrade, the following code was working fine. def create_root(administrator) root = create_root_collection(self.pingee_name, administrator, GlobalAccessibility.new,...
2006 Apr 04
6
Oracle Problem. Maybe driver
...achine but when i copy my app to our solaris server everything is fine until i try updating/inserting something into the DB. This is the error message : wrong number of arguments (1 for 0) RAILS_ROOT: config/.. Application Trace | Framework Trace | Full Trace /opt/tools/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes_pre_oracle'' /opt/tools/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes'' /opt/tools/lib/ruby/gems/1.8/gems...
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
...code below, if I attempt to create a Document, it works fine, but if I attempt to use one of the subclasses, I get the error: can''t dump anonymous class Class With an Application Trace of: C:/Ruby/lib/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml'' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connect ion_adapters/abstract/quoting.rb:22:in `quote'' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connect ion_adapters/mysql_adapter.rb:123:in `quote'' C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.r...
2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
I am trying to upgrate rails from 3.0 to 3.1, while updating rails version I am getting following error rake aborted! undefined method `sanitize_limit'' for #<ActiveRecord::Relation:0x2aaaad35d720> /some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation.rb:460:in `method_missing'' /some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation/query_methods.rb:208:in `build_arel'' /some_package/lib/...
2006 Nov 04
0
ActiveRecord, insert and not auto-incremented primary keys...
Hi, After playing while with ActiveRecord, I''m surprised it isn''t easier to insert data into a table whose primary key is not auto-incremented by the database server. The following code... --------------------------------------- -- MySQL database "test" --------------------------------------- CREATE TABLE gar...
2009 Jun 17
2
validates_uniqueness_of fails on STI in Rails 2.3.2
I''ve got something like this: class Position < ActiveRecord::Base end class CartItem < Position validates_uniqueness_of :product_id end When I try to save CartItem I get this error: ArgumentError: wrong number of arguments (1 for 2) from /home/joaz/.gem/ruby/1.8/gems/activerecord-2.3.2/lib/active_record/validations.rb:758:in `exists?''...
2010 Oct 28
2
ActiveRecord JDBC error Generated keys not requested
I''m getting the following error while connecting to mysql using activerecord-jdbcmysql-adapter (1.0.2). Rails 3.0.1. ActiveRecord::JDBCError: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate() or Connection.prepareStatement().: SET SQL_AUTO_IS_NULL=0 This occurs not matter what application I run it in to e.g. rak...
2006 Aug 19
7
Impossible to get stable?
...inite loop that constantly calls save! on a model. Keep in mind this is just for testing purposes. I catch all exceptions and put them in the log. I am tried setting allow_concurrency to true and false. Neither of them is stable. For both true and false I have got the following errors: #<ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: #<ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away: What have you found to be most stable? Setting allow concurrency to false and just putting a Mutex.synchronize object aroun...
2007 Oct 30
1
Merb - Losing connection to MySQL
..., `filename`, `height`, `user_id`, `parent_id`, `created_at`, `width`) VALUES(''image/jpeg'', NULL, 70907, NULL, ''2007-10-30 00:25:36'', ''-'', NULL, 43, ''DSC05209.JPG'', 525, 1, NULL, ''2007-10-30 00:25:36'', 700) - (ActiveRecord::StatementInvalid) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/connection_adapters/mysql_adapter.rb:243:in `execute'' /usr/lib/ruby/gems/1.8/...
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT: C:/devlopment_tools/projects/codex1/active/bugtrigger Application Trace | Framework Trace | Full Trace c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/l...
2006 Apr 30
3
MySQL connection problems on Dreamhost
...: MysqlError (Lost connection to MySQL server during query): Any idea why this happens? It''s rather intermittent and random, but I get this a few times a week. I''ve pasted a large section of the call stack below in case it helps. Thanks! Jeff /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:in `real_connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:316:in `connect'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/c...
2006 Jul 18
1
Saving an ActiveRecord object
I get this error when I try to save an object that extends of ActiveRecord: NoMethodError in TeamController#add_player You have a nil object when you didn''t expect it! The error occured while evaluating nil.keys .... .... #{RAILS_ROOT}/app/models/player.rb:17:in `create_player'' #{RAILS_ROOT}/app/controllers/team_controller.rb:53:in `add_player'...
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
Hi, I have been trying to do this for a few days now and cannot figure it out. I would be very grateful is anyone can help me I am trying to upload an attachment to AWS, S3 using paperclip, however every time I keep getting this error: ActiveRecord::AssociationTypeMismatch in ProjectController#create_notice Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT: C:/devlopment_tools/projects/codex1/active/bugtrigger Application Trace | Framework Trace | Full Trace c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/...
2006 Jun 23
1
''Series'' Pluralization
..."test/unit/user_test.rb" "test/unit/content_test.rb" "test/unit/content_series_test.rb" Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader Started EE......... Finished in 0.167462 seconds. 1) Error: test_has_content(ContentSeriesTest): ActiveRecord::StatementInvalid: Mysql::Error: Table ''freepets_test.content_sery'' doesn''t exist: SELECT * FROM content_sery LIMIT 1 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' /usr/lib/ruby/gems/...
2009 Feb 21
2
ArgumentError on model create statement
I have a rails app model that I''m getting a strange error that is just baffling me. I''ve stripped everything out of my model down to the basics and still get the error. So, here is the current model: class Metric < ActiveRecord::Base end When I go into the console, and issue a simple "Metric.create" command I get the following error: >> Metric.create ArgumentError: wrong number of arguments (1 for 0) from /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/callbacks.rb:288:in `callback...
2009 Jul 20
2
Hitting unknown error with "can't dup NilClass"
...works fine. But, after I hitting a refresh, it hits following problem "can''t dup NilClass". It is repeats the same for everytime i restart mongrel, working for the first time and failed for the rest. I append the application error log as below: /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2189:in `dup'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2189:in `scoped_methods'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ base.rb:2193:in `current_scoped_methods'' /opt/lo...