Problem with cucumber install on Snow Leopard (No such file or directory - features (Errno::ENOENT))

1,083 views
Skip to first unread message

pablitoman

unread,
Nov 12, 2010, 8:53:55 PM11/12/10
to Cukes
Hi,

I'm using snow leopard, with ruby 1.9.2., rubygems 1.3.7, cucumber
0.9.4, rspec 2.1.0

I'm trying to follow along using the RSpec book and doing the first
example, which basically has the user create a .feature file

when I run cucumber features, I get the following stacktrace

> cucumber features --backtrace --verbose
Code:

Features:
No such file or directory - features (Errno::ENOENT)
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
feature_file.rb:56:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
feature_file.rb:56:in `open'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
feature_file.rb:56:in `source'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
feature_file.rb:35:in `parse'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime/features_loader.rb:28:in `block in load'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime/features_loader.rb:26:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime/features_loader.rb:26:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime/features_loader.rb:14:in `features'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime.rb:132:in `features'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/
runtime.rb:45:in `run!'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/cli/
main.rb:48:in `execute!'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/cli/
main.rb:21:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/bin/cucumber:8:in
`<top (required)>'
/usr/local/bin/cucumber:19:in `load'
/usr/local/bin/cucumber:19:in `<main>'

I imagine this is something pretty simple that I've done wrong w/ my
installation, but I'm stumped.
I looked at the feature_file.rb file and it's looking for a file
called "features" within the cucumber directory...and there isn't a
file like that there.

Thoughts on where I'm going wrong?

TKS!

aslak hellesoy

unread,
Nov 13, 2010, 3:17:55 AM11/13/10
to cu...@googlegroups.com
The installation seems to have worked fine -- you wouldn't be able to start cucumber if it hadn't.
However, it seems you are doing something wrong when you are _running_ cucumber.

I looked at the feature_file.rb file and it's looking for a file
called "features" within the cucumber directory...and there isn't a
file like that there.

How did you come to that conclusion?
Actually, it's looking for a _directory_ called "features" within your current directory.

It's in this "feature" directory you are supposed to store your .feature files. It's OK to have 0 .feature files in here, but the directory must exist or Cucumber will fail.

Aslak


Thoughts on where I'm going wrong?

TKS!

--
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.


pablitoman

unread,
Nov 13, 2010, 7:04:05 AM11/13/10
to Cukes
> I looked at the feature_file.rb file and it's looking for a file
>
> > called "features" within the cucumber directory...and there isn't a
> > file like that there.
>
> How did you come to that conclusion?
> Actually, it's looking for a _directory_ called "features" within your
> current directory.

You're probably right (I wasn't sure if it was looking for a file or a
directory called "features").
I looked @ line 56 of feature_file.rb, which is File.open(@path,
Cucumber.file_mode('r')).read
I placed a "puts @path" just before line 56 and it tells me that @path
is "features", but I think feature_file.rb is looking for the
"features" directory within the directory that holds feature_file.rb b/
c there's no longer path shown when i do "puts @path"

Following the RSpec book, I simply created a directory in my user path
called "hello"

dcq38hb1:hello pbuser$ pwd
/Users/pbuser/Desktop/hello

dcq38hb1:hello pbuser$ ls
greeter_says_hello.feature

dcq38hb1:hello pbuser$ cucumber features
features <= output of my puts statement

Jed

unread,
Nov 13, 2010, 7:16:32 AM11/13/10
to Cukes
In the root directory of your project you need a directory labeled
features. 'cucumber features' runs all the features inside that
directory.

pablitoman

unread,
Nov 13, 2010, 8:12:24 AM11/13/10
to Cukes
wow. facepalm.

thanks!
Reply all
Reply to author
Forward
0 new messages