search for: statementinvalid

Displaying 20 results from an estimated 266 matches for "statementinvalid".

2005 Dec 17
1
lost in an ActiveRecord::StatementInvalid
I have an error I don''t know how to debug. I am adding the login suport in Depot (the example in the RoR book) and LoginController#add_user throws ActiveRecord::StatementInvalid in an innocent /login/add_user GET request. The trace goes down to a call to SQLiteAdapter#table_structure, and the source code suggests what''s happening is that "PRAGMA table_structure(#{table_name})" is returning empty metadata for some reason: def table_structur...
2008 Apr 15
4
ActiveRecord::StatementInvalid in BlogController#index
...o tutorial "how to build a blog engine in 15 minutes with ruby on rails" from the main rubyonrails website, and I''m getting an error when I try to use scaffold :post after editing my config file for the mysql database. Here is the exact error I''m getting: ActiveRecord::StatementInvalid in BlogController#index ActiveRecord::StatementInvalid RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace Request Parameters: None Show session dump Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} If anyone can...
2010 Nov 18
2
Testing Error: ActiveRecord::StatementInvalid
I intentionally deleted the attribute author from the table comments. When I used functional testing, I got the following message ActiveRecord::StatementInvalid: PGError: ERROR: column "author" of relation "comments" does not exist What should I need to do in order to avoid this error message!!! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s...
2006 Jun 26
1
Rake + SQL Server + Migrations == Errors. Help?!
...because of following DBI::DatabaseError # EOF OLE error code:800A0E78 in ADODB.Recordset Operation is not allowed when the object is closed. HRESULT error code:0x80020009 Exception occurred. # Could not dump table "community_news" because of following ActiveRecord::StatementInvalid # DBI::DatabaseError: Count OLE error code:8000FFFF in Microsoft OLE DB Provider for SQL Server ITransaction::Commit or ITransaction::Abort was called, and object is in a zombie state. HRESULT error code:0x80020009 Exception occurred.: EXEC sp_helpindex community_news # Could...
2005 Sep 02
0
RE: ActiveRecord::StatementInvalid error after app has beenrunning for a while
...gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Steve Downey Sent: Wednesday, August 31, 2005 2:11 PM To: tom-RNG44s5WON3LoSKbeXgoW6xOck334EZe@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] ActiveRecord::StatementInvalid error after app has beenrunning for a while Thomas Parslow wrote: >Hi, > >I''m having a bit of a problem with a rails app and I wonder if anyone >can help. > >It seems to run fine for a while, but if it''s left running too long >(left running as a fastcgi o...
2006 Aug 25
1
#<ActiveRecord::StatementInvalid: ThreadError: killed thread
Wht exactly does this mean? #<ActiveRecord::StatementInvalid: ThreadError: killed thread: That a thread was killed in the middle of a query? Thanks for your help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: T...
2010 May 27
0
Be more discriminating in rescue and wrapping with StatementInvalid
..., please let me know if that''s the case. I have a patch that addresses what is for me the most egregious case of overeager exception handling. In activerecord/lib/ active_record/connection_adapters/abstract_adapter.rb the #log method rescues Exception and then re-raises as an ActiveRecord::StatementInvalid exception. Some people have hit this problem when they have slow queries that are hanging the system and so I think the response is generally "fix your query". But we''re hitting this problem when we try to exit out of our background processes that are just cranking through a who...
2008 Sep 08
1
ActiveRecord::StatementInvalid Error
Hi There, I''m gettings the following errors while accessing my application. Can someone please tell what is the possible cause and can it be resolved. " ActiveRecord::StatementInvalid in Site#showalladdress Showing site/showalladdress.rhtml where line #3 raised: Mysql::Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''and enabled=''1'''' at line 1:...
2005 Aug 30
1
ActiveRecord::StatementInvalid error after app has been running for a while
Hi, I''m having a bit of a problem with a rails app and I wonder if anyone can help. It seems to run fine for a while, but if it''s left running too long (left running as a fastcgi or webrick process that is) it starts failing with an "ActiveRecord::StatementInvalid" error (i''ve included the full error from the log file below). I''m seeing this on both WEBrick on Windows XP (development environment) and Apache 2 with Fast CGI on Windows 2000 (production). Both using MySQL 4.1.13. Does anyone have any idea what the problem could be? The...
2006 Nov 24
7
Anyone know whats going on with PostgreSQL async_exec errors?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Anyone know what''s going on with ActiveRecord Edge and 1.2RC1 unit tests. I get 13 failures from the "async_exec" method call. ie: test_callback_rollback_in_save(ConcurrentTransactionTest): ActiveRecord::StatementInvalid: NoMethodError: undefined method `async_exec'' for #<PGconn:0xb75a8754>: SET client_min_messages TO ''warning'' Is this a known failure that someone in core is working on or is this functionality that needs to be fixed/implemented? Zach -----BEGIN PGP SIGNATURE-...
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error. ActiveRecord::StatementInvalid in ProjectsController#create Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , , )'' at line 1: INSERT INTO projects (`name`, `date_created`, `quote_id`, `client_id`, `desc...
2007 May 26
11
RSpec
Hi RSpec Mailing list, I''m new to RSpec and I am trying to get it running with the caboo.se sample rails app. I installed the current version of rspec with rspec_on_rails I tried to run rake spec but received: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec)
2006 Apr 20
5
strange mysql problem
i have this model: class LineItem < ActiveRecord::Base belongs_to :quote end in the console: >>l = LineItem.create ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , )'' at line 1: INSERT INTO line_items (`qty`, `quote_id`, `price`, `lead_time`, `part_number`) VALUES(, , , , ) why...
2005 Jul 28
1
ActiveRecord::StatementInvalid in Admin#list
I am having a problem. I am trying to work through the PDF of Dave Thomas''s book, but I keep getting this error after developing for five to ten minutes: WARNING: You have a nil object when you probably didn''t expect it! Odds are you want an instance of Array instead. Look in the callstack to see where you''re working with an object that could be nil. Investigate
2007 Jun 21
3
Sqlite3, in-memory db and rspec_server
...t line) combination to work. If I use a standard sqlite3 file db for the test db, and spec_server all the specs on my models pass. If I use an in-memory db for the test db, script/spec w/o spec_server, they all pass. But if I use in-memory and spec_server I get the following error: 1) ActiveRecord::StatementInvalid in ''User should be valid'' ActiveRecord::StatementInvalid ./spec/models/user_spec.rb:5:in `new'' ./spec/models/user_spec.rb:5: ./script/spec_server:23:in `run'' ./script/spec_server:44: Line 5 is the User.new in the before clause. I have tried this on various vers...
2010 Mar 17
3
ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded
Hi all, Ive been getting this error on one particular query repeatedly for the past few days. ActiveRecord::StatementInvalid: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE `posts` SET `updated_at` = ''2010-03-17 05:35:00'', `view_count` = 54 WHERE `id` = 158 Googling around, I found that this is basically because the transaction times out after waiting for the time period t...
2006 Jan 05
7
Multilanguage problem, need help
...nese charachters on my site i use utf8 for my database and i set this for each def in my controllers, all characters are set in my database as they are, ex ? => ? (not some wierd stuff), ? => ? @headers["Content-Type"] = "text/html; harset=utf-8" suppress(ActiveRecord::StatementInvalid) do ActiveRecord::Base.connection.execute ''SET NAMES UTF8'' end but these translations files are not in the db huh, what do i need to do???
2005 Jun 29
3
trouble with active record and sqlite
...nection( "adapter" => "sqlite3", "dbfile" => db_name) statement = "CREATE TABLE tests (id int not null primary key, x int, y int)" begin ActiveRecord::Base.connection.execute(statement) rescue ActiveRecord::StatementInvalid end # define a simple model class Test < ActiveRecord::Base end t1 = Test.new(''x''=>1, ''y''=>2) t1.save The error I get is: ActiveRecord::StatementInvalid: tests.id may not be NULL: INSERT INTO tests (''x'', ''y'') VALU...
2006 Aug 19
7
Impossible to get stable?
...t 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 around all database c...
2005 Nov 26
4
activerecord rake test_mysql
.................E...E..........E............F............EEE..............EEEEEEE....................FF....F..................................................................................... Finished in 77.0 seconds. 1) Error: test_adding_macro_callbacks(AssociationCallbacksTest): ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''type'' doesn''t have a default value: INSERT INTO projects (`name`, `id`) VALUES (''Active Record'', 1) ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:78:in `log'' ./test/../lib/active_record/c...