What's the difference between require '开发者_JAVA技巧cool_lib'
and gem 'cool_lib'
?
gem
gives you more options as to which exact gem you load: see here for plenty of details. In this example, there's no effective difference.
I'd recommend using require
unless you specifically need the power of gem
- it seems to be what most people use.
精彩评论