similar to: smart data loading

Displaying 20 results from an estimated 10000 matches similar to: "smart data loading"

2007 Nov 05
0
loading fixtures into oracle
Any idea why this fixture would fail to load any data? <% %w( Admin Pharmacist PI/Co-PI Research\ Nurse ).each { |g| Group.create( :name => g ) } %> It works perfectly in irb but when I do rake db:fixtures:load I get no data, no errors, and no error logs. I realize my fixture doesn''t look like your typical run-of-the-mill fixture but it''s that way because I''m
2006 Jul 23
6
routes
My best guess at how to make this route map.connect '':user'', :controller => ''user'', :action => ''profile'' makes my link_to :controller => ''admin'', :action => ''index'' stop working ? I''m needing urls like http://localhost:3000/username but without breaking all my other controller index
2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl include ActionDispatch::TestProcess FactoryGirl.define do factory :article do ....... photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' } end end IN mt test_helper.rb I defined the fixture_path def fixture_path File.dirname(__FILE__) + "/fixtures/" #
2008 Jun 24
2
wrong number of arguments (1 for 0) when using respond_to?
Trying to get an otherwise working app (in Rails 2.0.2) up to speed with Rails 2.1.0 and Ruby 1.8.7, I have some broken code I can''t seem to fix: module Pathmaker def self.append_features( base ) base.before_save do |model| model.path = model.name.downcase. gsub( /\ and\ /, ''-'' ). gsub( /\ on\ /, ''-'' ).
2010 Jun 10
9
Rails3 beta4 + Ruby 1.9
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I cannot save a record: > rails console Loading development environment (Rails 3.0.0.beta4) ruby-1.9.1-p378 > g = Game.new => #<Game id: nil, player_id: nil, versus_id: nil, finished: nil, created_at: nil, updated_at: nil> ruby-1.9.1-p378 > g.save NameError: undefined method `<=>'' for class
2014 Feb 18
0
How to Test Multimodel Paperclip attachments?
I'm using Rspec and FactoryGirl to create specs for multimodel paperclip attachments. From searching other questions, it seems like a single image attachment is more common. Car.rb class Car < ActiveRecord::Base has_many :uploads, dependent: :destroy validates :uploads, presence: { message: 'You must upload at least one image' }
2007 Mar 24
0
Testing Single Table Inheritance
Hi all, I have just started using Rspec in rails and trying to test the following models: >>node.rb class Node < ActiveRecord::Base acts_as_tree end >>project.rb class Project < Node end >>task.rb class Task < Project end >>milestone.rb class Milestone < Node end Fixtures for table nodes is set global in spec_helper.rb, with the types set manually in the
2006 Apr 05
0
Loading Binary Data into Rails Fixtures
Hi, I don''t know if this was obvious to anyone else but for ages I never knew how to load binary data into fixtures (like images) except via separate rake tasks. I just figured it out so I figured I would share info with people - it is written up at; http://www.realityforge.org/articles/2006/04/06/loading-binary-data-into-rails-fixtures -- Cheers, Peter Donald
2007 Nov 27
1
capistrano hangs
Any idea why this command takes upwards of 15 minutes to complete? run "cd #{release_path} && ORACLE_HOME=/home/oracle RAILS_ENV=production rake db:migrate" When running it against my local Postgres it completes in a few seconds or so. Running it against my local Oracle XE takes only slightly longer. But running it with capistrano over ssh is taking years away from my life.
2011 Nov 18
1
What does :count actually mean in assert_select?
Hi guys, I tried reading up the RSPEC Book (Dec 2010) and googled a bit but I could not find anything. I''m using Rspec2. Example: spec/factories/categories.rb ====================== FactoryGirl.define do factory :category_intakes, :class => ''category'' do name ''intakes and filters'' description ''airfilters and
2010 Mar 26
7
seed data
Hi I am using seed_fu to seed initial data to tables (http://github.com/mbleigh/seed-fu) . And in db/fixtures/state.rb I have values like (I am filling only two data for simplicity) State.seed_many(:name, :abbr,:fips,:country_id, [ { :name => "Alberta", :abbr => ''AB'',:fips => ''01'', :country_id => 2 }, { :name =>
2008 Jan 04
2
oracle adapter + activerecord sessions do not work
Anyone know what''s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it''s actually set using the debugger, but after the request completes the session is empty (the @data member is nil). The session_id is staying the same and the updated_at field is being updated but nothing I put in a session
2006 Jul 03
7
form_remote_tag with multipart/form-data
Does form_remote_tag supports multipart/form-data ? My form looks like this: <%= form_remote_tag :url => { :action => ''do_image_upload'' }, :html => { :enctype => ''multipart/form-data'' } %> <%= file_field ''image'', ''file_data'', :size => 32 %> <%= submit_tag
2013 Sep 04
2
Speed up image processing of Paperclip in Acceptance Tests
Hi All, I have a question here: How to Speed up image processing of Paperclip in Acceptance Tests When running capybara feature specs I can see lots of Slow factory notices which are populated byfactory_girl. These Slow factory things heavy slow down the feature specs, I think, even feature specs are intrinsic slow specs. Then I had some inspect and found out most of the Slow factory was
2008 Jul 28
0
Re: remote_ip always returns 127.0.0.1 (apache)
On Mon, Jul 28, 2008 at 3:09 PM, Luca Scaljery <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > I have my webrick server behind apache (all on the same server). The > problem I have now is that request.remote_ip always returns 127.0.0.1. > So it gets this IP from apache (I guess). How do I get the true client > IP address request.env[
2010 Sep 27
3
Rails3 app deploy : how to ?
Hello, I know many people are asking this kind of question. I searched in this forum and some others in the web but i did found something clear enough for my "ror''s power" (i''m not completly new but real close ;-) ) Well, I''m developing my application on os x, i''m using svn (team choice) for versionning but i will need to deploy on linux server (with
2008 Jan 21
1
RailsDB 0.2 Release
Hello, This post is to announce the latest 0.2 release of RailsDB: Q. What? A. RailsDB is a web application written in Ruby using the Ruby on Rails web framework. RailsDB provides a generic interface to popular open source databases such as MySQL, PostgreSQL, and SQLite. The RailsDB project is currently under heavy development and seeking more developers to assist. Q. Where? A.
2013 Oct 08
1
Trouble with rspec and FactoryGirl Sequence
I''m following Michael Hartl''s Ruby on Rails 3 Tutorial but I''m using Rails 3.2.8 and FactoryGirl 4.2.0 and rspec 2.14.1 I''m in chapter 10 trying to generate tests for pagination (using will_paginate 3.2.5 which works fine in dev) I can get FactoryGirl to test just fine if I don''t use Sequence but I can''t seem to figure out the correct syntax
2012 Nov 08
1
validates_uniqueness_of(*attr_names) w scope not working in unit test
Rails 3.2.8 Very strange , it works in dv mode console , but not in a unit test class User < ActiveRecord::Base belongs_to :subdomain validates_uniqueness_of :email, :scope => :subdomain_id class UserTest < ActiveSupport::TestCase def initialize_user @booboo = FactoryGirl.create(:subdomain, name: "booboo") @coocoo = FactoryGirl.create(:subdomain, name:
2007 May 21
2
Rails'' fixtures suck! But what about something like this?
Sorry about the very long email, but this is a hairy topic that''s been annoying me for some time and I decided to try to do something about. Also, if you got this twice, I apologize too, but it didn''t seem to have successfully gone out the first time. Background: ---------- I''ve been dealing with Rails for about a year and a half now. I''ve been using