开发者

what is the best to use - ruby gems or ruby plugins

开发者 https://www.devze.com 2022-12-30 17:22 出处:网络
What is the best practice when creating a rails project 1 - is it good to use ruby gems 2 - or is it good to use ruby plugins (as almost all the gems has their plugin versions)

What is the best practice when creating a rails project

1 - is it good to use ruby gems 2 - or is it good to use ruby plugins (as almost all the gems has their plugin versions)

and what are the strengths and weaknesses of eachoption

  • consider we are creating the rails project with rails 2.x.x or rails 3

thanks in advance

che开发者_JS百科ers, sameera


I think you should have to go with gems if possible. You will have a rich framework with slim applications. If you use a lot of plugins your application will be too heavy. I'm talking from experience. I have an application with a lot of plugins in it and it is hell slow.


I prefer to use gems because then I can manage them with Bundler and it will install the necessary dependencies for me. It will also cache gems, which solves deployment issues.

Also, it isn't possible to use only plugins, there are always gem dependencies, and I'd rather use just one mechanism, so that's another point for gems.

I think that plugins are slowly turning into gems and Rails 3 is moving further in that direction.


In my case, I use gems whenever I can but I do use plugins when I don't have access to gems on the host.

For example, Heroku doesn't have all the gems and neither does Media Temple. Since plugins are imported with the project, you can get away with it :)

0

精彩评论

暂无评论...
验证码 换一张
取 消