Displaying 20 results from an estimated 200 matches similar to: "rake test:units fails on Postgresql due to nil"
2006 Dec 04
5
ruby on rails ecommerce tests are failing, but why?
i am working through the Beginning Ruby on Rails Ecommerce book and on
page 101 where it is talking about integration tests, i run
test/integration/book_test.rb and it fails giving me the following
error message:
1) Failure:
test_book_administration(BookTest)
[test/integration/book_test.rb:45:in `add_book''
test/integration/book_test.rb:11:in `test_book_administration''
2007 Mar 01
1
PostgreSQL primary (sequence) key issue
Hi,
I have a sequence set up on one of my tables called seq_user_mytable. I
tried the following with no joy:
set_primary_key "user_id", :sequence => "seq_user_mytable" and:
ActiveRecord::Base.seq_user_mytable
again with no joy. How do I implement a sequence in Rails/ActiveRecord?
--
Regards
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this
2009 May 24
6
belongs_to not saving foreign key
Under Rails 2.3.2 using a completely brand new project, I have 2
models:
class Author < ActiveRecord::Base
# name:string
end
class Book < ActiveRecord::Base
# title:string
belongs_to :author # author_id
end
And a simple test where i create a Book with an Author using the
belongs_to and then update the foreign key directly:
require ''test_helper''
class BookTest
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
2009 Jan 20
5
Problem running rake test
I''m using the One-click 1.8.7rc2 Ruby Windows installer, everything
has been working fine up till now, when i want to start getting into
testing, i got this error, any reason why?
C:/Ruby/bin/ruby -Ilib;test "C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/
lib/rake/rake_test_loader.rb" "test/unit/word_test.rb"
C:/Ruby/lib/ruby/1.8/erb.rb:469:in `scan'': You have a
2002 Nov 28
1
output on glm.nb
Hi,
I make a model and have compared with null model.
anova(mnull,m1)
Model theta Resid. df 2xlog-lik test df LR stat. Pr(chi)
1 ... 0.39 161 -577.9129 NA NA NA
2 ... 1.30 150 -475.6839 1 vs 2 11 102.229 1.11e10-16
anova(m1)
Df Deviance Resid. Df Resid. Dev P(>|chi|)
NULL 161 282.139 9...
... ...
2006 Jul 02
5
"the number of parameters does not match the number of substitutions" error
All of a sudden, I''m getting this error:
1) Error:
test_index(AccountControllerTest):
RuntimeError: The number of parameters does not match the number of
substitutions.
/home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in
`assert_redirected_to''
2007 May 28
3
MiniMagick... Core Dump when Reszing Images?
Hi,
I''m using Mini Magick and that attachment_fu plugin to resize images
that the user uploads. Everything looks okay in my code, but I get a
core dump every time an image is uploaded.
The file successfully posts to the application, I can see that the
original file gets copied into the folder correctly. It appears that
it dumps immediately after that. I''m using Mongrel behind
2019 May 04
2
Vectorizing minimum without function attributes
Greetings,
The LLVM loop vectorizer does a great job handling reductions with the
`min(a, b)` function over an array of integers or floats. This finds the
smallest value of a list exploiting SIMD instructions, and works just as
well as a summation.
Specifically with floats, though, using the `fcmp` instruction, the
vectorization seems to require the function attribute "no-nans-fp-math"
2005 Oct 20
5
Unit Test Error: `load_specification': undefined method `parse' for Time:Class
All,
I''ve come across a confusing problem when attempting to run unit tests
for an application on OSX (works on Windows).
I''m receiving the following error:
`load_specification'': undefined method `parse'' for Time:Class (NoMethodError)
This is also confusing because I can''t figure out how the error
appeared. When I revert back to previous revisions,
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks,
I checked my test_helper.rb and it has
self.use_transactional_fixtures = true
My code was generated with 1.1.2 and I''m using 1.1.3 right now after
but the error persists.
I googled for this issue and it appears that a require is missing or
something like that. I can''t figure it out, please help!
/opt/local/bin/ruby -Ilib:test
2006 Oct 30
1
Testing
With the 0.2.0 code, unit testing of workers isn''t working out of the box.
I created a bare rails project (dubbed "ninja") and generated one worker
"FirstWorker" and did rake test
rake test
(in /home/joshua/tmp/20061030-bdbtest/ninja)
/usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb"
2006 Feb 02
4
uninitialized constant Test (NameError)
I have three Rails apps on my laptop.
Two can runs tests just fine.
The third generates this error when I try to run any tests:
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
> active_support/dependencies.rb:200:in `const_missing'':
> uninitialized constant Test (NameError)
> from ./test/unit/../test_helper.rb:5
> from
2006 Sep 29
1
[Fwd: Re: Samba print problem (everything looks right)]
This problem has been driving me crazy for a week.
Fedora Core 4, Cups 1.2.1 Samba 3.0.23a Thanks in advance.
--
Curtis Maurand
Senior Network & Systems Engineer
BlueTarp Financial, Inc.
443 Congress St. 6th Floor
Portland, ME 04101
207.797.5900 x233 (office)
207.797.3833 (fax)
mailto:cmaurand@bluetarp.com
http://www.bluetarp.com
-- To unsubscribe from this list go to the following URL and
2006 Jun 21
7
How to install patches?
Hi,
Can someone explain how do I install patches.
Once I go to the page, I am not sure what to download and how to apply?
I am RoR newbie.
-Thanks
Hari
--
Posted via http://www.ruby-forum.com/.
2009 Apr 06
3
After Rails 2.3.2 upgrade: superclass mismatch for class TestCase (TypeError)
I upgraded a working app from rails 2.1 to 2.3.2. Now when I run rake
test:units I get this error: /usr/lib/ruby/gems/1.8/gems/
activesupport-2.3.2/lib/active_support/test_case.rb:17: superclass
mismatch for class TestCase (TypeError)
I generated a new test app and all tests run OK.
For the upgrade I ran rake:update and renamed the class in test_helper
to ActiveSupport::TestCase. Also renamed
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment.
However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set
to "development" when my plugin''s init.rb is run.
How do you configure a plugin to load require a file in the test
environment?
Thanks,
Nick
--~--~---------~--~----~------------~-------~--~----~
You
2007 Dec 05
1
rake error - please help
Hi-
I''m suddenly getting this rake error where as before I wasn''t. And
nothing''s been changed. As you can see it says something about
"load_missing_constant". Is my development environment broken? Can
someone please tell me what this error means?:
bbgun@echobase:~/RailsProjects/rails_space$ rake test:functionals
(in /home/bbgun/RailsProjects/rails_space)
2019 May 04
2
Vectorizing minimum without function attributes
Thanks for the reply. I should say I'm actually working on 6.0, but I don't
think this part of the code changed much since. These are traces I made
with GDB optimizing a loop with floats and then integers, showing where
they diverge:
https://gist.github.com/nlw0/58ed9fda8e8944a9cb5e5a20f6038fcf
This is the point I believe we need to set the function attribute for the
vectorization to work
2010 Jun 11
5
Issues creating tables in mysql tests
Hello,
I''m a beginner, so any hints are appreciated; I''m still trying to find my
way around Rails code. For a bug I''ve found I need to create a table called
"values" so I added this:
create_table :values do |t|
t.integer :value
end
among the other table creations in
activerecord/test/cases/migration_test.rb. Is that ok? But then, when I run
the tests