# Testing file uploads and Ferret type of things

**URL:** <https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005>\
**Category:** Rails\
**Created:** [December 12, 2005, 12:45am UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005 "2005-12-12T00:45:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdurrahman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@abdurrahman](https://www.ruby-forum.com/u/abdurrahman)\
**Post date:** [December 12, 2005, 12:45am UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005/1 "2005-12-12T00:45:09Z")

</div>

Hi,

As rails grows more to a enterprise framework each and every day. And I  
like it very much for 99% of my web app’s. But I think there is missing  
something so please help me.

I have file upload’s to the rails applications and trying to get ferret  
running. However both of these are data file’s that can be inconsistent  
across development, testing and production envourement (dev/test could  
be one). I have ferret file located in db directory and my file’s in  
data/{model\_name}/{id}/{file\_id}{version}{extention}.

Now when I upload rails, most of the developers just upload everything  
(including the db/data directory). However both of them contain some  
kind of data that shouldn’t be replaced when dealing with a already live  
application. Couldn’t we make some official (for 1.1 rails) confention  
of using the data directory for files (in production/development) and  
test/data for testing data?

So you could upload everythink expect data when updating live  
application, this could be standarized by the many tools that are being  
developed for rad of rails. (like radrails 🙂 )…

maybe there is already been a discussion on this… don’t know : )  
couldn’t find anything…

Abdur-Rahman

---

<div class="post-metadata">

**Author:** ![abdurrahman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@abdurrahman](https://www.ruby-forum.com/u/abdurrahman)\
**Post date:** [December 12, 2005, 1:48am UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005/2 "2005-12-12T01:48:13Z")

</div>

On Dec 11, 2005, at 6:43 PM, Abdur-Rahman A. wrote:

> and my file’s in data/{model\_name}/{id}/{file\_id}{version}{extention}.  
> being developed for rad of rails. (like radrails 🙂 )…
> 
> maybe there is already been a discussion on this… don’t know : )  
> couldn’t find anything…
> 
> Abdur-Rahman

I use Switchtower for this type of thing. I stick things in the shared  
directory it creates and write the recipe such that it symlinks the  
stuff into the current/ tree. As an example, I have an application  
that uses TinyMCE, but I didn’t want it in my repository because it  
makes darcs slow (it has a ton of files, and I don’t really care about  
them). So I’ve got a recipe:

task :tinymce do  
run “ln -s #{shared\_path}/tiny\_mce  
#{current\_path}/code/trunk/public/javascripts/tiny\_mce”  
end

This can now be called on its own or by the deploy recipe, or whatever  
you need.

–  
Scott B.  
Lunchbox Software  
[http://lunchboxsoftware.com](http://lunchboxsoftware.com)  
[http://lunchroom.lunchboxsoftware.com](http://lunchroom.lunchboxsoftware.com)  
[http://rubyi.st](http://rubyi.st)

---

<div class="post-metadata">

**Author:** ![abdurrahman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@abdurrahman](https://www.ruby-forum.com/u/abdurrahman)\
**Post date:** [December 12, 2005, 2:42am UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005/3 "2005-12-12T02:42:15Z")

</div>

Hi, thnx,

But this doesn’t solve the issue of rails standarising a shared data  
folder. So future plugins/components can build upon that. Making a  
directory outside of the ‘webapp’ makes the application more difficult  
to maintain/deploy.

Abdur-Rahman

---

<div class="post-metadata">

**Author:** ![abdurrahman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@abdurrahman](https://www.ruby-forum.com/u/abdurrahman)\
**Post date:** [December 12, 2005, 5:12pm UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005/4 "2005-12-12T17:12:45Z")

</div>

Hi,

As rails grows more to a enterprise framework each and every day. And I  
like it very much for 99% of my web app’s. But I think there is missing  
something so please help me.

I have file upload’s to the rails applications and trying to get ferret  
running. However both of these are data file’s that can be inconsistent  
across development, testing and production envourement (dev/test could  
be one). I have ferret file located in db directory and my file’s in  
data/{model\_name}/{id}/{file\_id}{version}{extention}.

Now when I upload rails, most of the developers just upload everything  
(including the db/data directory). However both of them contain some  
kind of data that shouldn’t be replaced when dealing with a already live  
application. Couldn’t we make some official (for 1.1 rails) confention  
of using the data directory for files (in production/development) and  
test/data for testing data?

So you could upload everythink expect data when updating live  
application, this could be standarized by the many tools that are being  
developed for rad of rails. (like radrails 🙂 )…

maybe there is already been a discussion on this… don’t know : )  
couldn’t find anything…

Abdur-Rahman

---

<div class="post-metadata">

**Author:** ![abdurrahman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@abdurrahman](https://www.ruby-forum.com/u/abdurrahman)\
**Post date:** [December 13, 2005, 2:44am UTC](https://www.ruby-forum.com/t/testing-file-uploads-and-ferret-type-of-things/50005/5 "2005-12-13T02:44:48Z")

</div>

Hi,

As rails grows more to a enterprise framework each and every day. And I  
like it very much for 99% of my web app’s. But I think there is missing  
something so please help me.

I have file upload’s to the rails applications and trying to get ferret  
running. However both of these are data file’s that can be inconsistent  
across development, testing and production envourement (dev/test could  
be one). I have ferret file located in db directory and my file’s in  
data/{model\_name}/{id}/{file\_id}{version}{extention}.

Now when I upload rails, most of the developers just upload everything  
(including the db/data directory). However both of them contain some  
kind of data that shouldn’t be replaced when dealing with a already live  
application. Couldn’t we make some official (for 1.1 rails) confention  
of using the data with the following nesting:

- data  
– production  
– test  
– development

So you could upload everythink expect data when updating live  
application, this could be standarized by the many tools that are being  
developed for rad of rails. (like radrails 🙂 )…

maybe there is already been a discussion on this… don’t know : )  
couldn’t find anything…

Abdur-Rahman
