similar to: Test Database Empty after "rake test"?

Displaying 20 results from an estimated 20000 matches similar to: "Test Database Empty after "rake test"?"

2010 Dec 23
6
Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?
Here''s my issue: running ruby -I test test/unit/something_test.rb for each of my unit tests works perfectly. However, running rake test:units brings errors in all of them - some object becomes nil for some reason. Why might this be happening? Specifics: the object that is successfully not nil when I run the unit tests one-by-one but becomes nil when I do rake test:units is defined like
2011 Jan 19
6
rake aborted! can't convert Hash into String
Hello, I encouter a problem when i try to do "rake db:migrate": rake aborted! can''t convert Hash into String Here is the trace result: ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! can''t convert Hash into String /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1408:in
2009 Oct 05
4
Friendly_id and Rake problem.
Hello there, The plugin friendly_id (http://github.com/norman/friendly_id) has rake tasks that you can call. I''m using this plugin as a gem. I''m trying this: rake friendly_id:make_slugs MODEL=Post and it is rising this error: Don''t know how to build task ''friendly_id:make_slugs'' So the question is: how do I call a gem''s rake task? David
2010 Dec 12
5
Fixtures and unit tests - no such file to load
Hello all, I''m having some issues with my test fixtures and unit tests and am hoping somebody has an idea about how to fix it. Background: I have a table in my legacy database called tp_approval_step. For this table I have a fixture called tp_approval_step.yml I have a model called ApprovalProcessStep that uses set_table_name ''tp_approval_step'' In my test file,
2010 Jan 29
4
requiring records in the DB before testing
Is there any way I can require a small set of data be in the test database before any tests are run? (unit, functional, integration, cucumber, etc) Any way besides using fixtures, that is. Overload a rake task? Modify test_helper? Any ideas? (Simple Case: I have to have a minimal set of user roles defined before any users can be created) -- You received this message because you are subscribed to
2010 Jan 30
12
Best way to connect various applications?
Good evening, I''ve got three different self-programmed Rails application I need to connect and manage with a 4th "supervisor" application. There''s a wiki application, there''s a shop application and there''s a business directory application all with seperate user database etc. What I want now is one single user table so it can be all controlled by one
2010 Oct 27
4
Anything special needed to migrate test::unit tests from Rails 2x to Rails3?
Looks like I''ve gotten my app upgraded successfully, at least in the browser. When I ''rake test'' I get no love. I know I can start digging through the Rails rake tasks, first want to see if anyone has an idea what is going on: DKMac:creditcompare3 DK$ rake test (in /Users/DK/Documents/ror/projects/creditcompare3) DKMac:creditcompare3 DK$ (requesting verbose fares just
2009 Sep 04
12
Changing cursor while waiting for remote function response?
Hello, Google and the search function didn''t help me this time. Is it possible to change the mouse cursor while waiting for a response of a remote function call? -- Posted via http://www.ruby-forum.com/.
2010 Oct 03
23
Newbe: rails version issue
I am evaluating RubyMine but am getting the following rake issue... C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path'': can''t find executable rake for rake-0.8.7 (Gem::Exception) There are many web pages (through Google) that discuss this, and several recommend applying a patch and link to a .patch file (0001-version-bundled-gems-during-installation.patch). This file opens
2010 Sep 13
10
Could not find [GEM] locally or in a repository
Hey Guys, How could I fix the following: "gem install --no-rdoc --no-ri kete-feedzirra" ERROR: could not find gem kete-feedzirra locally or in a repository "gem install --no-rdoc --no-ri libxml-ruby" ERROR: could not find gem libxml-ruby locally or in a repository "gem install --no-rdoc --no-ri http_url_validation_improved" ERROR: could not find gem
2012 Oct 05
2
heroku rake db:drop error PG::Error: FATAL: permission denied for database "postgres"
How to empty DB in heroku<http://stackoverflow.com/questions/4820549/how-to-empty-db-in-heroku> I have a Postgres database on Heroku. It is one of the free beta ones. Locally, when testing, I often run rake db:drop && rake db:create && rake db:migrate as a way to reset the database. However, when I try to run this on Heroku, I get the error:\[code\]Couldn''t drop
2008 Dec 20
3
rake aborted (wrong number of arguments)
I''m following a tutorial here to get some columns in my database. I generated a model called ''product'' then I edited ''db/001_create_products.rb'' to have a few columns but when I try to migrate I get this error: bio4054059:depot rmorourk$ rake db:migrate (in /Users/rmorourk/Sites/depot) == CreateProducts: migrating
2009 Aug 12
3
Commands I will need to know in production
I''m fairly certain this is an easy question to answer but I like to make things more complicated than they need to be. I notice that a lot of people have: RAILS_ENV=production .. in their environment.rb files I don''t have this in mine on production but passenger/apache startup my app just fine in production mode. So, is it really necessary? I also noticed that in order to
2010 Aug 22
1
rails3: t.index in migrations not working anymore
Hello, I''m playing around with Rails3 and trying to upgrade one of my applications to Rails 3.0.0.rc and I get an error which should be still working. Migration: t.index :name When I execute rake: rake aborted! An error has occurred, all later migrations canceled: undefined method `index'' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x4b2b6b0> Does some one
2009 Apr 04
11
rake aborted! undefined method `empty?' for nil:NilClass
Hi, I''m getting the next errors, would anyone have any suggestions? Thanks. [~/rails/hip]# rake --trace db:migrate RAILS_ENV="production" (in /home/domain/rails/hip) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `empty?'' for nil:NilClass /usr/lib/ruby/1.8/erb.rb:469:in `scan''
2013 Jun 04
2
vhost && kernel BUG at /build/linux/mm/slub.c:3352!
Hello, Hit this right after killing trinity with Ctrl-C. Was fuzzing v3.10-rc4-0-gd683b96 in a qemu virtual machine as the root user. Tommi [29175] Random reseed: 3970521611 [29175] Random reseed: 202886419 [29175] Random reseed: 2930978521 [179904.099501] binder: 29175:2539 ioctl 4010630e fff returned -22 [29175] Random reseed: 2776471322 [29175] Random reseed: 3086119361 child 2606 exiting
2013 Jun 04
2
vhost && kernel BUG at /build/linux/mm/slub.c:3352!
Hello, Hit this right after killing trinity with Ctrl-C. Was fuzzing v3.10-rc4-0-gd683b96 in a qemu virtual machine as the root user. Tommi [29175] Random reseed: 3970521611 [29175] Random reseed: 202886419 [29175] Random reseed: 2930978521 [179904.099501] binder: 29175:2539 ioctl 4010630e fff returned -22 [29175] Random reseed: 2776471322 [29175] Random reseed: 3086119361 child 2606 exiting
2010 Dec 30
3
rake db:seed with has_many through (m:n with seperate table)
My model consists of users and tasks (m:n), the relation is stored in a seperate table sharedtabs (that contains some extra fields). Between tabs and tasks there is a 1:n relation. I have trouble writing my seed.rb: works: (1) tab = Tab.create(:name => ''Admin'', :category => 0) tab.tasks.create(:name => ''Admin_Tab1_Private Task 1'') works: (2)
2009 Nov 03
12
Mysql::Error: query: not connected
Hi there! I am PHP developer and trying to learn ROR. Currently I am building my first Rails website (OS X Snow Leopard, TextMate) and decided to switch from sqlite to mysql. After many-many hours of searching the internet I managed to install mysql gem. Now I get this error when I try to run rake migrations: rake aborted! Mysql::Error: query: not connected: CREATE TABLE `schema_migrations`
2010 Jul 28
5
db:fixures:load does not call Model.save()
Hello, $ ruby script/generate model balance plus:integer minus:integer equal:integer $ cat app/models/balance.rb class Balance < ActiveRecord::Base def save self.equal = self.plus - self.minus super end end $ cat test/fixtures/balances.yml _10-1: plus: 10 minus: 1 $ rake db:fixtures:load $ sqlite3 db/development.sqlite3 sqlite> select * from balances; //=>