Displaying 20 results from an estimated 5000 matches similar to: "Rake and NOT using schema.rb for clone_structure_to_test"
2005 Dec 27
4
Migrations & Unit Testing: Possible Bug in Rails?
I recently started using migrations to create the schema of a Rails
project I am working on. The database I am using for this project is
MySQL. The initial migration creates the table and also includes a
number of execute statements (to do some things like setting primary
keys, autoincrement on some columns and other messy voodoo).
Running "rake migrate" creates the database with no
2006 Jun 02
3
Wierdness with rake test_units and schema.rb
I have just migrated to use Rail 1.1 from 1.0.
In the progress of fixing and cleaning up the unit tests. I found the
following problem. I am not sure if this is a bug or it is my
environment.
When I run "rake test_units, some of the index in association tables is
not created, this leads to failures for some unit test cases.
Thinking that may be because I didn''t setup the
2006 Jan 02
3
rake test_units not loading any fixtures
Hello All,
If I run my unit tests individually using Ruby, they all work correctly.
However, if I try to run them using "rake test_units", I get a bunch of
error messages.
The error messages appear to be caused by rake not loading any of the
fixtures into the test database.
I am using PostgreSQL on Windows.
Does anyone have any suggestions?
Many thanks,
Bruce.
--
Posted via
2008 Oct 08
5
schema.dump chokes on RAW type
I haven''t seen anyone mention this yet.
The tail end of the migration process is a call to schema.dump. Our
primary keys are uuids and these choke schema.dump on both oracle and
postgres. The latter fails silently (skips three tables) while the
former complains about the RAW(16) in each of the three tables.
Anyone had a similar experience?
--
Posted via http://www.ruby-forum.com/.
2005 Mar 06
3
permission error in rake''s clone_structure_to_test
Hello,
When I try to run "rake clone_structure_to_test" on my project, I get
the following errors:
$ rake clone_structure_to_test
(in /home/www/cedscreening)
psql:db/development_structure.sql:8: ERROR: permission denied to set
session authorization
psql:db/development_structure.sql:16: ERROR: permission denied for
schema public
psql:db/development_structure.sql:34: NOTICE: CREATE
2005 Dec 25
3
SQLite primary key schema
So after successfully getting the test SQLite db to run from memory, I
tried running some tests but found that somewhere in the schema
translation from Postgres (my devel database) and SQLite Rails fails
to properly set the ''id'' column, which breaks all kinds of things.
Take as an example my ''users'' table. In Postgres the schema is
(generated with pgAdmin III):
2006 Mar 13
8
Nested find(:all, :include => ) statements
Is there a way for me to do:
OrderItem.find(:all, :include => [:user, :product => [:supplier]]
So I don''t have a supplier_id on my order_item, but have it on my
product, which is part of order_item.
Joerg
--
Posted via http://www.ruby-forum.com/.
2006 Aug 05
5
error with db:migrate
I''m new to ROR, and am working my way through the Agile Web Development
Book. In the test application, the authors tell me to test my database
connection by performing "rake db:migrate".
When I do, I get the error "Don''t know how to build task ''db:migrate''"
I''ve been looking around at the files, and I see a reference to a
2006 Mar 10
2
rake fails on build server, but not in development
I''m working in a development environment of Mac OS X with MySQL, and a
production deployment environment of Redhat with Oracle XE. In the
course of setting up a new continuous build server that more closely
mimics our production environment, I got stuck on the following
strangeness on the build server (Linux, Oracle).
1. rake fails
2. rake test_units works
3. rake test_functional
2008 Jun 05
23
unit test question
In development and production, I''ve got postgresql constraints that
prevent deleting a CaseManager if there is a Client that belongs to that
CaseManager.
In unit tests...and obviously in my testing db, those restrictions don''t
get added.
Is it wrong to test for deleting dependent records in unit tests?
Craig
--~--~---------~--~----~------------~-------~--~----~
You received
2006 Jul 17
14
REST Relationship Models
I''m trying to figure out an elegant way to do this:
I have the following three tables:
people, employer, employees
And consequently the following three models:
class Person < ActiveRecord::Base
end
class Employer < ActiveRecord::Base
has_many :employees
end
class Employee < ActiveRecord::Base
belongs_to :person
belongs_to :employer
end
I want to be able to say:
2006 May 31
7
How to render from with <%%> ?
I have a loop that I iterate through in my view.
<%
coll.each do |itm|
puts(itm.value)
end
%>
How do I render the itm.value without using a <%= %> tag? Should puts
not work?
Joerg
P.S. There is a good enough reason for me wanting to do this :-)
--
Posted via http://www.ruby-forum.com/.
2006 May 13
1
Rake clone bug?
Hi. I''m having a problem with my testing. The following table in my
development database (MySQL 4.1.12, InnoDB):
+-----------------------+------------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default |
Extra |
+-----------------------+------------------------+------+-----+---------+----------------+
|
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi,
I get errors doing this:
1) createdb myapp_test
2) rake db:test:clone_structure
3) rake test:units
rake aborted!
PGError: ERROR: relation "matches" already exists
I''m using the :sql schema format because there are some problems with
postgres and the :ruby schema format
config.active_record.schema_format = :sql
It seems rake test:units is trying to create the tables
2006 Feb 14
7
Launching a standalone Rails app
Hi,
I''ve developed a standalone Rails app - using tar2rubyscript and
rubyscript2exe. The users aren''t going to understand that the''ll need to
open the browser and go to 127.0.0.1:3000 to view the app, after running
the exe.
I am wondering whether other people have tackled this problem in the
past, and how they went about solving it.
One way would be to write a
2006 Jan 22
3
Download an Image using Net::HTTP
Hi,
I need to download an image, and I''ve mucked about with Net::HTTP
resp = Net::HTTP.get_response(''www.mydomain.com'', ''/test.jpg'')
f = File.new("test.jpg","w")
f.write(response.body)
And various other combinations using HTTP.get etc. Anyway, I get an
image, but it looks very psychedelic. This is obviously not the correct
way.
2005 Dec 23
2
no need for DB reflection when using config.active_record.schema_format = :ruby ?
Hi.
I''ve not seen anything on this so thought I''d put forward the idea and
see if it has any merit, or is already in practice.
When using migrations with config.active_record.schema_format = :ruby
(ruby as the canonical DB definition) it seems there would be no need
to query the database itself to determine its structure; it would
already be known.
This might have some good
2006 Jul 17
3
functional tests run fine on their own but fail with rake
this is a weird one. i have 8 functional tests classes. when I run them
individually, they all pass. When i use rake or ''rake test:functionals'' one
of them fails. I''ve traced the error back to a problemwith reading data from
the session.
when running the tests individually, the data is there. when run using rake,
it''s nil.
has anyone come across anything
2006 Jan 12
8
Synching between Sqlite and MySql
Hi folks,
I am running an offline Rails app that periodically connects to the
Internet to download the latest catalogue, and upload any new orders.
I am about to implement the synching bit - and was thinking whether
there is any other solution other than writing webservices and code to
do a manual sync of the data, or whether there is a more nifty and
robust way using say replication?
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`,