I’ve come across a few tutorials where the author declares two versions of the same gem in the gemfile, even in the same group.
"haml" and "haml-rails"
"rspec" and "rspec-rails"
"cucumber" and "cucumber-rails"
and there are more examples of this….
Why is this done? Is this a better way to work with these gems rather than declaring a single gem?
Thanks
Well, these are not the same gems. Rails versions usually extend the standard libraries.
But because
foo-railshasfooin its dependencies (see example here), you just needfoo-railsin your Gemfile (Bundler is just great).