SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What are these other foldres for?

    So I've been interested in knowing what some of these other folders generated by rails are:


    • components
    • vendor and vendor/plugins
    • lib
    What goes into these folders and how does rail handle these files?

  2. #2
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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...

  4. #4
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The contents of the vendor folder doesn't have to be something you've neccesarily paid for.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  6. #6
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Brak
    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.
    Where can I read on how to create and use plugins or files for the "vendor" folder?

  8. #8
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    SitePoint Zealot bronze trophy
    Join Date
    Jun 2004
    Location
    Stockholm, Sweden
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •