similar to: Database works with console, fails otherwise

Displaying 20 results from an estimated 100000 matches similar to: "Database works with console, fails otherwise"

2006 Sep 26
0
Find Returning String Instead of Integer?
Any ideas on why this is? The quantity field in mysql is INT, but I get back a string? This is preventing me from using the increment method. >> @cart = Cart.new => #<Cart:0x2730f40 @new_record=true, @attributes={}> >> @cart.items << Item.find(:first) => [#<Item:0x272d6ec @attributes={"vendor_id"=>"1",
2006 Jun 23
3
Yet another problem with NoMethodError in Store#display_cart
Hi everybody, I''ve search a lot on google to help me with this one without success. I know that some people had the same problem as I have, but there solutions doesn''t seems to work for me. I''m trying to do the depot example in the AWDwR book. But now I''m stock with a problem that I can''t solve. I get this error: <--- begin error here --->
2009 Apr 19
1
Cucmber: Mysql::Error: query: not connected: ROLLBACK
Hi, I ran in trouble with unexpected rollbacks using cucumber 0.3.0. My feature-file looks like Scenario: Create Valid Item Given I start and the step is Given /^I start$/ do get "/items" end In my log/test.log I get SQL (0.2ms) SET NAMES ''utf8'' SQL (0.2ms) SET SQL_AUTO_IS_NULL=0 SQL (0.1ms) BEGIN Processing ItemsController#index
2006 Jul 27
5
Calculate methods on attr_accessor objects
Is it possible to use the calculate methods (sum, etc.) on attr_accessor attributes? Ie: Class Item < ActiveRecord::Base attr_accessor :total_cost def total_cost @total_cost = self.cost_unit * self.amount end calling Item.sum(:total_cost) or Item.sum(''total_cost'') both return a unknown column ''total_cost'' mysql error. I thought that active
2006 Jun 16
8
OffRailed, and stuck in the book : (
Help, i''ve been trapped on the tracks here for a day now in the Agile w/ Rails book (latest edition) I can''t get page 115 to display. It says: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each Extracted source (around line #3): 1: <h1> My Agile Cart</h1> 2:
2006 May 05
2
Rails MySQL Stored Procedure Fun
Hi All. I have a question about calling MySQL stored procedures that is a little different from the usual. I know stored procedures are not really the ''Rails way'' but in this case there is no other way to accomplish the same task and I have used them successfully. Background: I am using a query to produce a real-time status of items flowing through a factory. The query
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and Item. "Page" has many "Items"; "Item" belongs to "Page". Item Model: class Item < ActiveRecord::Base end class Article < Item belongs_to :page end Page Model: class Page < ActiveRecord::Base end class Issue < Page has_many :articles end In my controller, when I
2008 Aug 14
6
xenconsoled needs restart after long dom0 uptime otherwise domU console output hangs and domU doesn''t come up
Hello list! I''ve noticed this problem a couple of times now.. so I''m wondering if it''s a known bug? Symptoms: After "long" dom0 uptime (174 days when it happened now, was something similar on previous times too) cannot start new pv domUs anymore.. pygrub runs and boots the kernel, but kernel newer gets to actually running initrd and the console output
2006 May 31
4
Add 2 Records with Migrations. No errors. No new records.
I have created the following migrationg by using: "ruby script/generate migration AddFirst" But when I run: "rake migrate" it doesn''t add these two records. I don''t get any errors. The schema_info table is created and schema.rb is updated with ":version => 1". Can I not create records this way? When I load up script/console and put in the same
2005 Dec 18
0
Difficulty with creatating a model
Hi everyone, I''ve just started with Rails and Ruby. I just started to play one of those RPG and to get my feet wet I''m writing an app to keep track of item fusions. So the scoop is that item can be fused with another items to create a higher level item. The higher level items can be fused to create even higher level items ... etc. I''m using MySQL to store the data.
2006 May 10
0
Boolean attributes - not so simple as I thought
Suppose I have a table ''items'' with the attribute ''bool'' which is boolean. There''s an array @attribs which holds :bool and some other symbols of attributes which are not boolean. class Item < ActiveRecord::Base { def attribs [:bool , :x , :y] end } The trouble is that @item.bool? and @item.bool behave differently. If I set @item.bool=5
2008 Sep 03
0
saving to mysql while displaying a partial that calls for the list of mysql items lags
Hi, Originally this was part of my highlighting question but now after debugging and slicing up the problem i found that the problem was not rjs but that saving to database does not sync with the ajax partial Controller code: ____________________________________________ def add_to_cart @sguser = Sguser.find(params[:ad]) @lineprice = SglineItem.find(:all, :conditions => "sguser_id =
2005 Dec 19
2
Difficulty using correct moldel for the data in DB
Hi everyone, I''ve tried posting the same question to the list last Friday but somehow did not see it being posted.. I''ve just started with Rails and Ruby. I just started to play one of those RPG and to get my feet wet I''m writing an app to keep track of item fusions. So the scoop is that item can be fused with another items to create a higher level item. The higher
2015 Mar 02
0
Connect failed to database
>> >> Just some quick ideas >> * check if the mysql socket file has rw permissions for the dovecot user # ls -l /var/lib/mysql/mysql.sock srwxrwxrwx. 1 mysql mysql 0 Mar 1 19:33 /var/lib/mysql/mysql.sock >> >> * Try to run the mysql query as user dovecot (su dovecot) The dovecot user I set up is a non-interactive user /sbin/nologin I studied different setup
2015 May 07
2
How to make asterisk work with remote mysql database?
Hi, I am trying to make asterisk 11.7 work on Ubuntu 12 (amd64). I would like asterisk to not use the inbuilt sqlite database. Instead, I want it use a remote mysql database. Is this possible ? If yes, is there any good HowTo on this ? Running 'make install' installed my asterisk successfully, but no conf files were copied to /etc/asterisk. Nor was a service start script placed in
2008 Oct 23
2
cPanel RoR with mySQL database
Hi, I have just started using Ruby on Rails with cPanel. I can set up my application ok but I am having problems with linking the application with a mysql database. I have run ruby sctipt/generate model and created the table through the migration. The table appears in the database correctly. The original settings were for sqlite3 but I want to use mysql so that may be the issue. I have changed
2015 Mar 02
1
Connect failed to database
Am 02.03.2015 um 19:30 schrieb Dan LaSota: >>> >>> Just some quick ideas >>> * check if the mysql socket file has rw permissions for the dovecot user > > # ls -l /var/lib/mysql/mysql.sock > srwxrwxrwx. 1 mysql mysql 0 Mar 1 19:33 /var/lib/mysql/mysql.sock >>> >>> * Try to run the mysql query as user dovecot (su dovecot) > > The dovecot
2015 Mar 02
2
Connect failed to database
Am 02.03.2015 um 19:30 schrieb Dan LaSota: >>> Just some quick ideas >>> * check if the mysql socket file has rw permissions for the dovecot user > > # ls -l /var/lib/mysql/mysql.sock > srwxrwxrwx. 1 mysql mysql 0 Mar 1 19:33 /var/lib/mysql/mysql.sock that's not the problem > I have tried with > connect = host=localhost dbname=servermail
2007 Jun 11
0
remote database connection disconnecting after certain amoun
I have a server running Merb connecting to a remote database using "establish_connection." When I call many methods in fast succession, I eventually get this Mysql error: Mysql::Error: Lost connection to MySQL server during query. I have the ruby mysql bindings installed, as well. Im thinking that its a problem with the database configurations. But its hard to say its a timeout issue
2005 Aug 25
0
[Fwd: Re:Dovecot] Finally PEBKAC was Failed authentication to a mysql database (bug or PEBKAC?)]
-----Forwarded Message----- From: jigen <jigen at metalabs.org> To: Timo Sirainen <tss at iki.fi> Subject: Re:Dovecot] Finally PEBKAC was Failed authentication to a mysql database (bug or PEBKAC?) Date: Sat, 20 Aug 2005 18:33:11 +0200 On Fri, 2005-08-19 at 16:56, Timo Sirainen wrote: > Dovecot just passes these values to Mysql library without doing anything > to them itself. So