Displaying 20 results from an estimated 300 matches similar to: "maddening intermittent failures in unit tests with "working" code"
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works
fine running scripts/spec, but when I run rake spec instead, I get:
ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM
service but no IM name should be invalid''
Mysql::Error: Cannot delete or update a parent row: a foreign key
constraint fails
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
The build failed.
CHANGES
-------
Revision 8649 committed by gbuesing on 2008-01-16 20:07:10
Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002
M /trunk/activesupport/CHANGELOG
M /trunk/activesupport/lib/active_support/core_ext/date_time/calculations.rb
M /trunk/activesupport/test/core_ext/date_time_ext_test.rb
TEST FAILURES AND
2005 Nov 26
4
activerecord rake test_mysql
Hi (I''m resubmitting this because
First question: This is the rails dev list, correct?
I''d like to submit a patch and am following the steps on this page:
http://dev.rubyonrails.org/
Here''s what I did (using mysql 5.0.15-nt):
created 2 databases:
activerecord_unittest
activerecord_unittest2
created 1 user: rails (giving all priveleges to both databases)
ran
2006 May 09
2
Disabling FOREIGN KEYs in a Rake task
Hi,
How could I disable my database FOREIGN KEYs in a Rake task?
Or, how could I call the execute() method in a Rake task?
I''m trying to perform something like:
task :delete_the_cippalippa => :environment do
require RAILS_ROOT+''/lib/marsian.rb''
# FIXME: execute() is undefined
execute "SET FOREIGN_KEY_CHECKS = 0"
Cippalippa.delete(-1)
2011 Jul 25
4
Rails 3 test database issues
I am having a problem using the test database in Rails 3. It
apparently has kept track of aspects of the database that I deleted
completely from my migrations at some point. I don''t always use the
''down'' part of a migration and sometimes just recreate the whole
database. I did rake db:migrate:reset and rake db:test:prepare, but
when I run my test it is trying to access
2009 Aug 06
6
Maddening error: "marshal data too short"
I''m occasionally getting an odd Rails error that says "marshal data
too short".
Our entire web app seems to be working fine -- we can post forms, save
models, redirect, login, etc, without any problems. Then out of
nowhere a request will result in the 500 error "marshal data too
short". Subsequent requests to *any* page then result in the same
error -- even pages
2007 Apr 01
7
database.yml: encoding: utf8 does not work
Hi all
According to the Agile 2nd Ed book I added the line encoding: utf8 to my
database.yml connections.
But now when running rake I get plenty of errors:
Character set ''utf-8'' is not a compiled character set and is not
specified in the ''/usr/local/mysql/share/mysql/charsets/Index'' file
What''s wrong here?
I checked this Index file, but it seems to
2014 Aug 28
2
sql codificación R
Estimados
Les envío dos archivos, el primero es mysql, el segundo es el código R.
A ambos los ejecuté en ubuntu 14.04, anteriormente en mi script tenía
anotado, se ve feo pero anda, esto es referente a los acentos, hoy se ve
feo (codificado no en español) y rjson produce un error, básicamente me
informa que no es UFT-8.
Desconozco que pasa, ¿alguna idea?
Desde ya muchas gracias.
Javier
2006 Mar 14
5
Maddening library loading problem
Hi everyone.
I recently wrote a nice module that I want to use in my rails app. It
consists of a few files in a directory that I have places in the lib
directory. It looks like this:
/lib/KMLTools/foo.rb, bar.rb, baz.rb
Some of these files load each other and I finally got those to work by
using the File.dirname(__FILE__) trick. When I simply require the file
into my controller, everything is
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core
produced by the multiple delete on a HABTM relationship. I have
confirmed that my plug-in is being included into the base during
runtime however the code does not seem to be overridding the base
class.
module ActiveRecord
module Associations
module ClassMethods
def has_and_belongs_to_many(association_id, options =
2009 Feb 02
2
looking for help with NoMethodError: undefined method `key?' for #<String:0x4795488>
Hi all,
Any help with this would be appreciated. I''m using instant rails,
updated to 2.2.2, on Windows XP.
I''ve created my DB and scaffolded a few things and put some fixtures
into place, and when I run the tests I get many errors that look like
this:
---------------------------------
1) Error:
test_the_truth(EntityTest):
NoMethodError: undefined method `key?'' for
2007 Jul 12
0
[retry] fixture_references: "Mysql::Error #HY000"? (fwd)
I''m resending this with additional information, as I''ve had no
response. I''ve been trying to use the fixture_references plugin,
and I seem to be getting lots of:
1) Error:
test_truth(DeviceTest):
ActiveRecord::StatementInvalid: Mysql::Error: #HY000Field ''description_id'' doesn
''t have a default value: INSERT INTO devices (`id`) VALUES (2)
2007 Jun 13
2
Delete the fixtures on a functionnal test
Hi,
Since couple a day, I block with the delete of my fixtures in my
functionnals test. In my controller, I need test a redirect if there
are no value.
But i load my fixtures in start of my test and in a specific test I
want delete all. Only in this method, not in other method. In API, I
discover the method delete_existing_fixtures, who seem the good
practice, but I can''t find how use
2006 Nov 07
4
Unknown column 'id' in 'field list
Hello,
I''m trying to write a unit test for model that doesn''t have an ''id''
field. I created the model''s table with the following migration, making
sure the primary key was set.
class CreateActiveUserMetrics < ActiveRecord::Migration
def self.up
create_table :active_user_metrics,
{:id => false,
2006 Jun 24
5
Rake vs Ruby for running tests (error discrepency)
I''m having (to me) a strange problem with errors when running my tests
with rake as opposed to using ruby. If I do rake test:units I get this
error for several tests, but not all:
13) Error:
test_player_has_game_statistics_for_season(PlayerSeasonTest):
ActiveRecord::StatementInvalid: Mysql::Error: Duplicate entry ''22'' for
key 1: INSERT INTO positions (`name`, `id`,
2006 Jul 27
1
importing data with migration for habtm
I have 2 tables: products and categories. They are both linked by a
habtm association. I have a fixture to import all the data in each table
but I dont know how to import the data in the categories_products table
since that table has no model, so I cant use that code:
f = Fixtures.new(Category.connection, # a database connection
"categories", # table name
2010 Jun 29
2
Upgrade Too 1.2.11 Broke Everything
Good Day.
I have had dovecot working successfully for years now, however after a
system update , dovecot refused to start up complaing that im not using
absolute paths.
It took a bit of hacking to get it working again as can be seen by the sql
query, however now imap doesn't work anymore because of that change. Im
lost!!
dovecot --version
1.2.11
dovecot -n
# 1.2.11:
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
I''ve encountered a perplexing problem whilst following along the demo
app in the "Agile Web Development with Rails" book. Any help would be
greatly appreciated. Here is a brief time line of my tale of woe:-
0. Been programming (business apps) and designing/building DBs for two
decades - but new to both Ruby and Rails (so I apologise in advance if
I''ve made some
2011 Sep 07
0
Madden 07 and 08 crash
I loaded both Madden 07 and Madden 08 into Wine, and they both run. However, players do not show up (in create a team, create a player) and in their places are a bunch of colored triangles making random shapes. Then, when I attempt to play a game, wine crashes, saying that there is a serious problem (but not specifying the problem itself).
Is there something that I've done wrong? Both games
2006 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone,
For one of our projects we have a need to deploy and maintain a demo.
As a result I''ve attempted to setup a set of rake tasks for the job.
My goal is have one rake task called "deploy_demo" which purges the
database, migrates to the current schema, and loads the db from a set
of fixture files in a specified location.
I''ve written two new tasks the perform