Getting started with rails? Must have gems?

2019-02-02 01:20发布

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 question is a bit more pointed than how do I get started...

What are some of the must have gems that everyone uses?

I need basic authentication, so I have the restful authentication gem, but beyond that, I don't know what I don't know. Is there a run down of this information somewhere? Some basic setup that 99% of the people start with when starting a new rails application?

Thanks in advance.

10条回答
祖国的老花朵
2楼-- · 2019-02-02 02:12

HAML is a must have. You'll never think of HTML in the same way again -- No more tag soup.

查看更多
别忘想泡老子
3楼-- · 2019-02-02 02:13

How can nobody have mentioned andand yet? It's the best thing since ||=

查看更多
叼着烟拽天下
4楼-- · 2019-02-02 02:20

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:

查看更多
甜甜的少女心
5楼-- · 2019-02-02 02:26

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
查看更多
登录 后发表回答