So I've been interested in knowing what some of these other folders generated by rails are:
What goes into these folders and how does rail handle these files?
- components
- vendor and vendor/plugins
- lib
| SitePoint Sponsor |



So I've been interested in knowing what some of these other folders generated by rails are:
What goes into these folders and how does rail handle these files?
- components
- vendor and vendor/plugins
- lib


Components are for, well. Components.
Vendor is for stuff that runs your application, like plugins. If you checked out the source of rails to vendor/rails, you'd be running edge rails on just that app.
lib is for code that isn't really application specific, but just general "usage" if that makes sense. Say, a library for accessing svn. Or a spelling dictionary, etc.
Studio Rockstar's Blog - A journey to quitting the dayjob.
Vendor is where you would put 3rd party plug ins, bits of code, etc.. that your purchased to keep things organized. Although they would most likely be the same as components, these are things you paid for, etc...
The contents of the vendor folder doesn't have to be something you've neccesarily paid for.



Thanks Guys.
I've read up on components and I understand them now. I also understand the purpose the lib folder now. But I stll do not understand the vendor folder? Maybe I should read up on plugins... heh


Eh, no offense but don't listen to ryanyogan. I don't even know of any plugins that cost money. Basically, vendor is parts that extend (or run) Rails and not particularly your application. So, it's for extending the framework, and not your app.
Studio Rockstar's Blog - A journey to quitting the dayjob.



Where can I read on how to create and use plugins or files for the "vendor" folder?Originally Posted by Brak
![]()


http://wiki.rubyonrails.com/rails/pages/Plugins
Keep in mind Plugins are *very* new to Rails (less than a month old IIRC). They're also only available to 0.14+ Rails, not the 0.13 series.
The idea is to keep the bloat away from rails and just have plugins that people can install or not install to add on that custom functionality (for example, acts_as_versioned).
Studio Rockstar's Blog - A journey to quitting the dayjob.
Vender is where you want to keep 3rd party code, there is nothing now but there will be many things for free and purchase. I said pay for because most things are not free these days, you can put whatever you want in there though. You would want to put what you created in components. Yes it extends rails, however it is specific only to that application, hence you put it in the applications vendor folder. It is nothing more then a directory to keep you more organized when your app starts to make use of many differnt modules.
Vendor doesn't have to be 3rd party code, it could be your code as well.
If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva
Bookmarks