[rspec-users] Difference between gem and plugin
dchelimsky at gmail.com
Sun Oct 5 13:48:29 EDT 2008
On Sun, Oct 5, 2008 at 11:20 AM, Fernando Perez <lists at ruby-forum.com> wrote:
>> Why ask us when you can ask rubygems?
> Well I prefer to ask (and sound stupid 5 minutes) than not ask (and be
> stupid all my life), that's the way I work. From the cucumber github
> wiki located at: http://github.com/aslakhellesoy/cucumber/wikis
> (Rails people – see Ruby on Rails).
> After you have installed Ruby or JRuby – install Cucumber with the
> following command:
> gem install cucumber
> When I go to the Ruby on Rails wiki page, Aslak says to install Cucumber
> as a plugin. Therefore I was wondering if for a Rails app, installing
> Cucumber as a gem was okay.
> In the past, even though the RSpec gem existed, it was recommended to
> install the plugin version of rspec if it was going to be used with a
> Rails app.
Didn't mean to make you feel bad or stupid. Was just offering you a
way to answer at least part of your question. Teach a man to fish, and
That said, here's some fish:
As of 1.1.5, rspec-rails is now released as a gem. If you're using
rails >= 2.0, you can use rspec/rspec-rails gems because the rspec
generator (script/generate rspec) is visible, and the generated files
are all you need in the rails app.
Cucumber and webrat are both released as gems.
My recommendation is to use gems for all these tools, except in cases
where you need functionality that is in git, but not in the latest
gem. Even then, I'd recommend downloading
source from git and building the gem locally rather than adding the
code to your repo.
Of course, this all assumes just a local build on your development
machine. If you've got a build machine running scenarios and code
examples, you might find it easier to keep unreleased code in your
Another option would be to use gems by default, and then store them in
vendor/gems instead of vendor/plugins when you need functionality
More information about the rspec-users