Displaying 20 results from an estimated 200 matches similar to: "rake spec:models failing"
2006 Sep 01
2
Mrelation does not exists
Hello!
I''m having the following error:
RuntimeError: ERROR C42P01 Mrelation "subjects_users_id_seq" does not
exist Fnamespace.c L200 RRangeVarGetRelid: SELECT currval
(''subjects_users_id_seq'')
when I try to do:
subject= SubjectsUser.new(params[:subjects_user])
subject.save
The models:
class User < ActiveRecord::Base
has_one :last_entrie
has_one
2007 Oct 18
4
Feeding the framework ?
Hi there,
Is it just me or do many other rspec / rpsec_on_rails users spend more
time than they would like feeding the framework ?
Don''t get me wrong, I love rpsec, but I seem to spend about 2/3 hours
per week hunting down rspec problems.
For example, today `rake spec:models` is broken. When I migrate, load
fixtures and run `spec -cfs` all is well. When I run `rake spec:models`,
2006 May 11
4
Legacy database problem
Hi
I am trying to use Ruby on Rails to work with an existing database. The
problem is that, all the table names begin with a captial letter (e.g.
Products). So I did the following changes
in environment.rb, I''ve added under # Include your application
configuration below
ActiveRecord::Base.pluralize_table_names = false
In class Product, I''ve added
set_table_name
2006 Jul 20
4
Help with Rails and postgres with sequence numbers (global?)
Hello,
I am building an Rails applications that has to integrate an legacy
system (lxoffice) (schema at:
http://www.lx-office.org/uploads/media/DB_Schema_2.1.1_R_393_17_03_2005_.pdf).
They somehow use global ids (global for some tables). I can not change
the schema and still I want to use Rails to access it and not pure SQL.
When I try to insert a record I get the following message:
2008 Nov 14
3
migration with data
Hi
I am using postgres and have two migration files like
001_create_categories.rb as
class CreateCategories < ActiveRecord::Migration
def self.up
create_table :categories do |t|
t.column :name, :string, :limit=>80
end
end
def self.down
drop_table :categories
end
end
and 002_populate_categories.rb
class PopulateCategories < ActiveRecord::Migration
2006 Aug 08
2
Testing Inconsistencies - ruby works rake fails
I''m getting some very weird results when testing my system. If I run my
unit tests using => ruby \test\unit\<filename.rb> each of the tests
pass. If I run => rake test_units I get several failures, and they all
have to deal with the same issue. For instance I''m getting =>
ActiveRecord::StatementInvalid: RuntimeError: ERROR C42P01
Mrelation
2006 May 12
0
Using primary key that is not named "id"
Hi
I am using a legacy database that the primary key is named "ProductID"
and its type is SERIAL (or INT NOT NULL auto_increment).
set_primary_key "ProductID", is added to the Product class
Then I used >ruby script/generate scaffold Product Admin
to generate my controllers. When I try to insert a new product in the
products table, it gave me this error
RuntimeError:
2008 Mar 18
0
rake tasks
Hi All,
New to merb, I was wondering if there are any similar rake tasks to that
of the rails rake stats?
Im using merb version 0.5.3
Tried the aok task and am getting the following:
eoghan-js-Computer:test_app eoghanj$ rake aok
(in /project/merb/test_app)
/usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45:
warning: already initialized constant RELEASE
rake rcov
(in
2005 Jul 07
1
Rails 0.13 failing on Win XP
Hi all,
Since 0.13 just got out, I decided to live a little on the edge and
upgraded my working 0.12.1 Rails apps to 0.13. Which made them crash
with a bang!
After a little investigation it looks like even a fresh app will crash
with a message: "allocator undefined for proc"... I''m on Win XP,
everything was fine under Rails 0.12.1
Any help would be highly appreciated.
--
2007 Dec 11
3
Fresh rspec on rails install blows up
Hi there,
I installed the rspec on rails plugin for a new project today and guess
what -- it blows up!
All by other rspec on rails projects are working fine.
I updated all gems & still no joy. Any ideas how I can troubleshoot this
one ?
Here''s my setup:
- ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0]
- Rails 1.2.5
Installed with svn:
ruby script/plugin install
2011 Nov 25
4
Sprockets File not Found Exception.
Hi Everyone,
I was trying out some sample applications for Rails. I created some
controllers and pages. But when i try to access one of them i get an
exception on the webpage:
---------------------------------------------------------------------
Sprockets::FileNotFound in Pages#home
Showing c:/railscode/test_app/app/views/layouts/application.html.erb
where line #6 raised:
couldn''t
2011 Aug 16
0
help using unless in exec for postgres database creation
Hi,
I have the following exec type:
exec{"createdb":
path => "/usr/bin:/usr/sbin:/bin",
command => "sudo -u postgres createdb -U postgres -E UNICODE opennms",
unless => "sudo -u postgres psql -l | grep opennms > /dev/null",
require => Service["postgresql"],
}
Where this basically says, if the
2007 Feb 06
1
Postgres, testing and maybe spurious database DROPpings?
Folks,
I don''t like that I have to grant CREATEDB rights to the test user to
get testing working smoothly with Postgres.
What is the philosophical reason that Rails wants to drop and recreate
databases during the testing? It would seem to me that "pg_dump -c" (the
"clean" dump option, similar to mysqldump''s --add-drop-tables ) would
suffice when
2009 Aug 21
1
[PATCH server] update installer exec items to single_exec where applicable
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
installer/modules/ovirt/manifests/freeipa.pp | 8 ++++----
installer/modules/ovirt/manifests/postgres.pp | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/installer/modules/ovirt/manifests/freeipa.pp b/installer/modules/ovirt/manifests/freeipa.pp
index e5de852..f91cd43 100644
---
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
2009 Jun 23
1
[PATCH server] added ovirt-wait4service and invokation in installer to wait for psql/ldap
FIXME this patch isn't complete, still need to figure out the ldap command to
wait for that service, something along the lines of:
ldapsearch -b dc=priv,dc=ovirt,dc=org -x
(but how will we parse the base from the installer? also this cmd
fails, how to fix?)
---
installer/modules/ovirt/manifests/ovirt.pp | 8 +++++-
installer/modules/ovirt/manifests/postgres.pp | 13 ++++++---
2005 Mar 07
1
postgres unit testing in 0.10.1
http://dev.rubyonrails.com/changeset/856
looks to me like it''s not going to work, since there''s no way of
specifying a password to pg_dump/dropdb/createdb.
If you set PGPASSWORD in your environment it might work, but that''s not
documented anywhere and isn''t done automatically in the Rakefile.
See
http://thread.gmane.org/gmane.comp.lang.ruby.rails/3693
for
2008 Aug 29
2
rake db:test:prepare
Hi
I am using postgres And I have already development database..When I
give
rake db:test:prepare it gives
sh: dropdb: command not found
sh: createdb: command not found
But how ever test db is created Same happens also when rake
db:test:clone
I would like to know why I am getting this message
Thanks in advance
Sijo
--
Posted via http://www.ruby-forum.com/.
2008 Jan 11
2
Problems with rspec + remote db
hey guys,
I''m having a problem here, I have a pc in my house that I use as a db
server (postgresql).
I have the pr-postgresql gem running and it works very well
But when I try to "rake spec" I get these 2 errors
C:/ruby/bin/rake: No such file or directory - dropdb -U "coleira"
coleira_test
C:/ruby/bin/rake: No such file or directory - createdb -E unicode -U
2007 Dec 16
1
Unit test preperation with migrations
I have spent sometime this afternoon learning how to unit test rails
applications and integrate the Cerberus CI tool. One key area confuses
me however, and I would appreciate other peoples views of how best to
overcome the issue.
My understanding is that the ''test'' and ''test:units'' have the
db:test:prepare pre-requisite which copies the schema from dev to the