Trouble installing Cucumber into Rails 3

91 views
Skip to first unread message

steven_noble

unread,
Oct 11, 2010, 7:40:38 AM10/11/10
to Cukes
After previously having used and enjoyed Cucumber under Rails 2.x, I'm
try to get it up and running on Rails 3.

My Gemfile includes:

group :development, :test, :cucumber do
gem "compass", ">= 0.10.5"
gem "compass-susy-plugin", ">=0.8.1"
gem "haml"
gem "gherkin"
gem "mongrel"
gem "rspec-rails", ">= 2.0.0"
gem "capybara"
gem "cucumber", ">=0.7.3"
gem "cucumber-rails"
gem "database_cleaner"
gem "launchy" # So you can do Then show me the page
gem "spork"
gem "sqlite3-ruby", :require => "sqlite3"
gem "webrat"
end

When I try to generate Cucumber, I get the error/trace that I've
pasted below. What should I do next?

Many thanks,

Steven.

iMac-001EC20A3C44-3:script steven$ rails generate cucumber:install --
rspec --capybara --spork
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/
dependencies.rb:239:in `require': no such file to load -- gherkin/
parser/tag_expression (LoadError)
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:591:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.7.3/lib/cucumber/ast/
feature_element.rb:2
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:591:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.7.3/lib/cucumber/ast/
background.rb:1
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:591:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.7.3/lib/cucumber/ast.rb:4
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:591:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.7.3/lib/cucumber/
parser.rb:2
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:591:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:225:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/
active_support/dependencies.rb:239:in `require'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.7.3/lib/cucumber.rb:6
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
64:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
64:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
62:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
62:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
51:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:
51:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.2/lib/bundler.rb:112:in
`require'
from /Users/steven/Dropbox/local/local/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.0/lib/rails/commands.rb:
15:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.0/lib/rails/commands.rb:
15
from script/rails:6:in `require'
from script/rails:6

Matt Wynne

unread,
Oct 11, 2010, 7:42:20 AM10/11/10
to cu...@googlegroups.com
Hi Steven,

This is a guess, but try taking gherkin out of your gemfile. It's probably requiring an older version of gherkin. Gherkin should be implicitly required by Cucumber anyway.

cheers,
Matt

http://blog.mattwynne.net
+44(0)7974 430184

steven_noble

unread,
Oct 11, 2010, 7:46:15 AM10/11/10
to Cukes
Hi Matt,

Actually I put it in because on Stack Overflow I saw that suggested to
someone with a similar problem.

http://stackoverflow.com/questions/3556147/rails-3-cucumber-load-error

I've just removed it and confirmed the problem remains.

Cheers,

Steven.

Matt Wynne

unread,
Oct 11, 2010, 7:47:33 AM10/11/10
to cu...@googlegroups.com

On 11 Oct 2010, at 12:46, steven_noble wrote:

> Hi Matt,
>
> Actually I put it in because on Stack Overflow I saw that suggested to
> someone with a similar problem.
>
> http://stackoverflow.com/questions/3556147/rails-3-cucumber-load-error
>
> I've just removed it and confirmed the problem remains.

Can you try it with the latest version of Cucumber (0.9.x) please?

> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

steven_noble

unread,
Oct 11, 2010, 8:01:49 AM10/11/10
to Cukes
Good point. Updated Gemfile and Cucumber. Now I get:

steven$ rails generate cucumber:install --rspec --capybara --spork
Could not find generator cucumber:install.

Many thanks,

Steven.
> > For more options, visit this group athttp://groups.google.com/group/cukes?hl=en.

Matt Wynne

unread,
Oct 11, 2010, 8:07:13 AM10/11/10
to cu...@googlegroups.com

On 11 Oct 2010, at 13:01, steven_noble wrote:

> Good point. Updated Gemfile and Cucumber. Now I get:
>
> steven$ rails generate cucumber:install --rspec --capybara --spork
> Could not find generator cucumber:install.

Do you still have cucumber-rails in there? You need it.

> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

steven_noble

unread,
Oct 11, 2010, 8:10:15 AM10/11/10
to Cukes
Indeed. Gemfile includes:

group :development, :test, :cucumber do
gem "compass", ">= 0.10.5"
gem "compass-susy-plugin", ">=0.8.1"
gem "haml"
gem "mongrel"
gem "rspec-rails", ">= 2.0.0"
gem "capybara"
gem "cucumber", ">=0.9.2"
gem "cucumber-rails"
gem "database_cleaner"
gem "launchy" # So you can do Then show me the page
gem "spork"
gem "sqlite3-ruby", :require => "sqlite3"
gem "webrat"
end



Matt Wynne

unread,
Oct 11, 2010, 8:16:57 AM10/11/10
to cu...@googlegroups.com

On 11 Oct 2010, at 13:10, steven_noble wrote:

> Indeed. Gemfile includes:
>
> group :development, :test, :cucumber do
> gem "compass", ">= 0.10.5"
> gem "compass-susy-plugin", ">=0.8.1"
> gem "haml"
> gem "mongrel"
> gem "rspec-rails", ">= 2.0.0"
> gem "capybara"
> gem "cucumber", ">=0.9.2"
> gem "cucumber-rails"
> gem "database_cleaner"
> gem "launchy" # So you can do Then show me the page
> gem "spork"
> gem "sqlite3-ruby", :require => "sqlite3"
> gem "webrat"
> end

I don't understand that. I just tried that Gemfile on a brand new Rails 3.0 app and `rails g --help` shows the cucumber:install generator.

Daft question, but did you remember to do `bundle install` after you changed the gemfile that last time?

> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

aslak hellesoy

unread,
Oct 11, 2010, 10:51:27 AM10/11/10
to cu...@googlegroups.com
On Mon, Oct 11, 2010 at 2:16 PM, Matt Wynne <ma...@mattwynne.net> wrote:

On 11 Oct 2010, at 13:10, steven_noble wrote:

> Indeed. Gemfile includes:
>
> group :development, :test, :cucumber do
> gem "compass", ">= 0.10.5"
> gem "compass-susy-plugin", ">=0.8.1"
> gem "haml"
> gem "mongrel"
> gem "rspec-rails", ">= 2.0.0"
> gem "capybara"
> gem "cucumber", ">=0.9.2"
> gem "cucumber-rails"
> gem "database_cleaner"
> gem "launchy"    # So you can do Then show me the page
> gem "spork"
> gem "sqlite3-ruby", :require => "sqlite3"
> gem "webrat"
> end

I don't understand that. I just tried that Gemfile on a brand new Rails 3.0 app and `rails g --help` shows the cucumber:install generator.

Daft question, but did you remember to do `bundle install` after you changed the gemfile that last time?



steven_noble

unread,
Oct 11, 2010, 4:59:34 PM10/11/10
to Cukes
Thanks Aslak. The gems are all in the :development group in my
Gemfile.

Matt, yes indeed I have run bundle install. :-)

I also get:

steven$ rails g --help
Usage: rails generate GENERATOR [args] [options]

General options:
-h, [--help] # Print generator's options and usage
-p, [--pretend] # Run but do not make any changes
-f, [--force] # Overwrite files that already exist
-s, [--skip] # Skip files that already exist
-q, [--quiet] # Suppress status output

Please choose a generator below.

Rails:
controller
generator
helper
integration_test
mailer
migration
model
observer
performance_test
plugin
resource
scaffold
scaffold_controller
session_migration
stylesheets

ActsAsTaggableOn:
acts_as_taggable_on:migration

Cucumber:
cucumber:feature
cucumber:skeleton

Rspec:
rspec:install

TestUnit:
test_unit:controller
test_unit:helper
test_unit:integration
test_unit:mailer
test_unit:model
test_unit:observer
test_unit:performance
test_unit:plugin
test_unit:scaffold



On Oct 12, 1:51 am, aslak hellesoy <aslak.helle...@gmail.com> wrote:
> On Mon, Oct 11, 2010 at 2:16 PM, Matt Wynne <m...@mattwynne.net> wrote:
>
> > On 11 Oct 2010, at 13:10, steven_noble wrote:
>
> > > Indeed. Gemfile includes:
>
> > > group :development, :test, :cucumber do
> > > gem "compass", ">= 0.10.5"
> > > gem "compass-susy-plugin", ">=0.8.1"
> > > gem "haml"
> > > gem "mongrel"
> > > gem "rspec-rails", ">= 2.0.0"
> > > gem "capybara"
> > > gem "cucumber", ">=0.9.2"
> > > gem "cucumber-rails"
> > > gem "database_cleaner"
> > > gem "launchy"    # So you can do Then show me the page
> > > gem "spork"
> > > gem "sqlite3-ruby", :require => "sqlite3"
> > > gem "webrat"
> > > end
>
> > I don't understand that. I just tried that Gemfile on a brand new Rails 3.0
> > app and `rails g --help` shows the cucumber:install generator.
>
> > Daft question, but did you remember to do `bundle install` after you
> > changed the gemfile that last time?
>
> Also seehttp://github.com/aslakhellesoy/cucumber-rails/issues/closed#issue/58
> > cukes+un...@googlegroups.com <cukes%2Bunsu...@googlegroups.com>.
> > >>>>> For more options, visit this group athttp://
> > groups.google.com/group/cukes?hl=en.
>
> > >>>> cheers,
> > >>>> Matt
>
> > >>>>http://blog.mattwynne.net
> > >>>> +44(0)7974 430184
>
> > >>> --
> > >>> You received this message because you are subscribed to the Google
> > Groups "Cukes" group.
> > >>> To post to this group, send email to cu...@googlegroups.com.
> > >>> To unsubscribe from this group, send email to
> > cukes+un...@googlegroups.com <cukes%2Bunsu...@googlegroups.com>.
> > >>> For more options, visit this group athttp://
>
> ...
>
> read more »

steven_noble

unread,
Oct 12, 2010, 5:11:40 AM10/12/10
to Cukes
I see the answer. Because I had an older version of Cucumber, my
generator is cucumber:skeleton not cucumber:install.
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages