I ended up modifying the rails db:fixtures:load task:
namespace :db do
namespace :bootstrap do
namespace :fixtures do
desc "Load fixtures into the current environment''s
database. Load specific fixtures using FIXTURES=x,y"
task :load => :environment do
require ''active_record/fixtures''
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
(ENV[''FIXTURES''] ?
ENV[''FIXTURES''].split(/,/) :
Dir.glob(File.join(RAILS_ROOT, ''db'',
''bootstrap'', ''*.
{yml,csv}''))).each do |fixture_file|
Fixtures.create_fixtures(''db/bootstrap'',
File.basename(fixture_file, ''.*''))
end
end
end
end
end
Looking at the code it makes me wonder if the rails version of
Fixtures.create_fixtures is windows compatible because of the unix
path it uses for ''test/fixtures''
Hmm....
On Dec 4, 1:14 am, eggie5 <egg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a set of fixtures in my db/bootstrap dir. anybody have any idea
> on how I can use rake db:fixtures:load with fixtures in a different
> dir?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---