Getting started with rails? Must have gems?

前端 未结 10 1710
南方客
南方客 2020-12-28 08:34

I\'m starting work on a project using Rails, but I\'m waiting for the 3rd edition of the pragmatic rails book to come out before I purchase a book.

Anyway, my questi

相关标签:
10条回答
  • 2020-12-28 08:59

    This is very, very subjective because it all depends on what your application does! However, I've just had a look at the Gems I have installed and the one that absolutely does leap out as mandatory is Capistrano.

    BTW Restful Authentication is a Rails plugin not a Gem.

    0 讨论(0)
  • 2020-12-28 09:04

    This is a old thread but I thought I'll refine the list with what I believe to be must have gems at this point in time:

    • RSpec or Shoulda - tools for BDD/testing
    • factory_girl - fixture replacement
    • will_paginate - simple pagination
    • paperclip - image uploading/attachment
    • CanCan - authorization
    • Authlogic - authentication
    • HAML - templating engine
    0 讨论(0)
  • 2020-12-28 09:12
    • sudo gem install haml
    • sudo gem install ZenTest
    • rspec on rails
    0 讨论(0)
  • 2020-12-28 09:16

    For pagination, will_paginate.

    0 讨论(0)
  • 2020-12-28 09:19

    The only gems you need are:

    • Rails
    • Rake

    If you "gem install rails" you'll get everything you need for Rails. You only need gems when you need them, so it's not worth worrying about before then.

    EDIT: Actually there are a couple more you'll probably need:

    • mysql - or whatever Ruby database driver you need
    • mongrel - you don't necessarily need this until production, but it's nice to use in dev/test too
    • ZenTest - I use this mainly for "autotest" so that my tests run in a console window whenever my source files change

    There could be many other gems that help you but we'd need more info from you to know if they're applicable, eg:

    • Web scraping (hpricot)
    • CSV (fastercsv)
    • Amazon S3 support (aws-s3)
    • Image manipulation (rmagick)
    • Graphing (gruff) - I use this as a plugin
    • Role-based security (role_requirement) - This one is a plugin too
    0 讨论(0)
  • 2020-12-28 09:19

    mini_magick instead of rmagick.

    0 讨论(0)
提交回复
热议问题