I am creating an application using rails and spree at work.  One point
of value is the administrator being able to upload files that will seed
the database.


Our original solution was datashift_spree:
https://github.com/autotelik/datashift_spree

Two problems arose.  1) apparently, the datashift bundle is 250 MB and
was hindering our deployment to heroku.  2) We couldn't figure out how
to use it from within a deployed application.

After a few people spent a few days with these problems, I ended up just
writing the functionality myself ( no datashift at all ).  We have two
applications being developed, and the code is valuable to both.

We would like to extract it, and the first thought was 'gem'.

And thus the questions arise :)

Assuming making a gem is the correct idea, I'm going to need to call
ActiveRecord methods such as 'create' from within the gem.  How do I
create or simulate a database that the gem can connect to?  When I do
get passed that question, how do I tell the gem to be able to 'know'
when it is just me testing it, and it being in a real rails environment?

Thanks.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/52c59a9598bc67c51e12b916054a8905%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to