similar to: How/where to load initial data?

Displaying 20 results from an estimated 20000 matches similar to: "How/where to load initial data?"

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 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
2009 Mar 28
10
Use fixtures within fixtures?
Heya, I''m using globalize2 and have following problem with my fixtures: categories.yml: one: parent_id: two color: #ff00aa two: color: #00ff11 three: parent_id: two color: #ab00ab category_translations.yml one-en: id: one locale: en name: Cars one-es: id: one locale: es name: Coches two-en: id: two locale: en name: Start two-es: id: two locale: es
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
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 Aug 07
3
Test Database Empty after "rake test"?
Hey, can somebody tell me why my test database is always empty after I run "rake test" but not after I test single test files? My rake db:seed for the test database takes like 6 minutes and I don''t really wanna reseed it every time I run "rake test". Is it possible to not let "rake test" truncate my database? -- Posted via http://www.ruby-forum.com/. --
2009 Dec 22
1
Rails fixtures - defining a table name?
Hi, At the minute all my fixtures have the same name as the table that they are intended for, because of a recent issue with rails it doesn''t seem possible to have a fixture beginning with the word ''test'' Does anyone know of a way to have a different fixture name and then map it to the correct table? Thanks -- Posted via http://www.ruby-forum.com/. -- You received
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in the testing chapter. when I run the following test(or any other test) I''m new and not sure where to start looking. require ''test_helper'' class ProductTest < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true end end I
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; //=>
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2007 Oct 05
5
PostgreSQL, templates, and test databases
Hi everyone. I''m having a bit of a problem with an application I''m currently developing with Rails 1.2.3 and PostgreSQL, attempting to use test-first development. Here''s the scenario: * I have the usual three databases, with migrations. Testing has been working beautifully. * I need to store geographic data, so I add PostGIS to all three databases (along with
2010 Aug 06
4
Object/Record foreign key IDs set to zero
Hello, Hope no one minds me just jumping in here with a question. I''m completely new to Ruby on Rails. I''ve been reading "Simply Rails 2", and following their examples. I reached a point where the unit tests were unexpectedly failing. Upon investigation, I discovered that when Rails loads the fixtures, the foreign keys aren''t being populated with the foreign
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone, I have a function test the is failing (despite the fact the function actually works in the application). I was looking for some debug advice on how to find my problem. Here is the test: def test_should_delete_word assert_equal ''published'', words(:one).status debugger delete :destroy, :id => words(:one).to_param assert_equal
2009 Jul 11
3
Migration in Multiple Database
hello to all I been working on this from past few days. .I am talking about separate migration for each one of the multiple database that a single rails application has connection with.I know that rails can work with multiple databases but what with migrations for e.g my main rails application has a connection to two databases 1> main_development 2> secondary_development Know suppose i
2009 Sep 22
6
Import excel / csv files
Hey, What way is the best to do imports of CSV files?
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
2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
2010 Jan 25
3
Dynamic attributes!
I want to create a general model ''Product'' that I will be able to store several attributes in it. For example the attributes :id :name :description are pretty stantard. So each product will have this attributes. However, I wanted to know if it is possible to create dynamic attributes. In the case of a cell phone device I might want to store the IMEI of the phone, this
2010 Feb 04
2
preload test data from factory_girl
Is there a way to preload common data made by factory_girl to speed up tests instead of recreating these common data at the beginning of every test. For example, I want to have 10 users premade at the beginning of every test. I found this http://agilewebdevelopment.com/plugins/factory_data_preloader But the page says that this plugin does not "play nice" with autotest. But I use
2009 Jul 05
4
Deploying without capistrano, using git pull?
I''m NOT working on an enterprisey big time rails application; just something for my personal site. I''ve been deploying via local> git push origin master remote> git pull origin remote> sudo /etc/init.d/httpd restart Trying to decide if this is sufficient, or if learning capistrano and setting that up will give me any advantages over this? Thanks, Dave