error No such file or directory - /dev/null

314 views
Skip to first unread message

ParvG

unread,
Jun 24, 2010, 1:43:56 PM6/24/10
to Cukes
Hi,

I'm running into the following exception, when I try to execute a
feature (any feature):
No such file or directory - /dev/null (Errno::ENOENT)

(eval):2:in `fill_in'
./features/step_definitions/web_steps.rb:37:in `/^(?:|I )fill in
"([^"]*)" with
"([^"]*)"$/'
features\g_search.feature:7:in `When I fill in "q" with "ruby"'

Failing Scenarios:
cucumber features\g_search.feature:5 # Scenario: search something

1 scenario (1 failed)
4 steps (1 failed, 2 skipped, 1 passed)
0m0.140s


I'm trying to run this test using in selenium profile, but never see
the selenium server started. I have gone through making all the
config changes, but am not able to shake this error off. I have tried
the setup suggested in this post http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium,
but no luck.

Thanks for you help!

aslak hellesoy

unread,
Jun 24, 2010, 1:47:49 PM6/24/10
to cu...@googlegroups.com
On Thu, Jun 24, 2010 at 7:43 PM, ParvG <parvinde...@gmail.com> wrote:
> Hi,
>
> I'm running into the following exception, when I try to execute a
> feature (any feature):
> No such file or directory - /dev/null (Errno::ENOENT)
>

What's the full --backtrace (pass that option to cucumber)
Are you on windows?

> (eval):2:in `fill_in'
> ./features/step_definitions/web_steps.rb:37:in `/^(?:|I )fill in
> "([^"]*)" with
> "([^"]*)"$/'
> features\g_search.feature:7:in `When I fill in "q" with "ruby"'
>
> Failing Scenarios:
> cucumber features\g_search.feature:5 # Scenario: search something
>
> 1 scenario (1 failed)
> 4 steps (1 failed, 2 skipped, 1 passed)
> 0m0.140s
>
>
> I'm trying to run this test using in selenium profile, but never see
> the selenium server started.  I have gone through making all the
> config changes, but am not able to shake this error off.  I have tried
> the setup suggested in this post http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium,
> but no luck.
>
> Thanks for you help!
>

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

ParvG

unread,
Jun 24, 2010, 2:09:28 PM6/24/10
to Cukes
I am on windows.
Ruby 1.8.7-patch249
rubygems 1.3.7
cucumber 0.8.1
cucumber-rails 0.3.2
selenium-client 1.2.15 (i tried 1.2.18 also)
webrat 0.5.3

Here's the full exception backtrace:

C:\local\projects\webratTest>cucumber features/g_search.feature -p
selenium --b
cktrace
Using the selenium profile...
C:/local/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/
gem_dependency.rb
119:Warning: Gem::Dependency#version_requirements is deprecated and
will be rem
ved on or after August 2010. Use #requirement
Strategy is : truncation and ORM is active_record
Feature: Search Google
As a user
I want to see info on something

Scenario: search something # features\g_search.feature:5
Given I am on the home page # features/step_definitions/
web_steps.rb:15
No such file or directory - /dev/null (Errno::ENOENT)
C:/local/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_suport/core_ext/kernel/reporting.rb:38:in `reopen'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_suport/core_ext/kernel/reporting.rb:38:in `silence_stream'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_rc_server.rb:21:in `start'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_rc_server.rb:15:in `boot'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_rc_server.rb:9:in `boot'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_session.rb:202:in `setup'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_session.rb:171:in `selenium'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/webrat-0.5.3/lib/webrat/
selenium/elenium_session.rb:39:in `visit'
(eval):2:in `visit'
C:/local/projects/webratTest/features/step_definitions/
web_steps.rb:16
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe
/core_ext/instance_exec.rb:48:in `instance_exec'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe
/core_ext/instance_exec.rb:48:in `cucumber_instance_exec'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/core_ext/instance_exec.rb:69:in
`cucumber_run_with_backtrace_filtering'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/core_ext/instance_exec.rb:36:in `cucumber_instance_exec'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/rb_support/rb_step_definition.rb:54:in `invoke'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_match.rb:26:in `invoke'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/step_invocation.rb:62:in `invoke'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/step_invocation.rb:41:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:99:in `visit_step'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:164:in `broadcast'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:98:in `visit_step'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/step_collection.rb:15:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/step_collection.rb:14:in `each'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/step_collection.rb:14:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:93:in `visit_steps'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:164:in `broadcast'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:92:in `visit_steps'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/scenario.rb:54
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:334:in `before_and_after'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/scenario.rb:52
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:323:in `call'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:323
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/language_support/language_methods.rb:13
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/language_support/language_methods.rb:95:in `call'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/language_support/language_methods.rb:95:in
`execute_around'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/language_support/language_methods.rb:12:in `around'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:322
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:320:in `call'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/step_mother.rb:320:in `around'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/scenario.rb:51:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/scenario.rb:108:in `with_visitor'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/scenario.rb:45:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:51:in `visit_feature_element'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:164:in `broadcast'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:50:in `visit_feature_element'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/feature.rb:35:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/feature.rb:34:in `each'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/feature.rb:34:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:20:in `visit_feature'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:164:in `broadcast'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:19:in `visit_feature'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/features.rb:29:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/features.rb:17:in `each'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/features.rb:17:in `each'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/features.rb:28:in `accept'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:14:in `visit_features'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:164:in `broadcast'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/ast/tree_walker.rb:13:in `visit_features'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/cli/main.rb:64:in `execute!'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/../
lib/cucumbe/cli/main.rb:25:in `execute'
C:/local/Ruby187/lib/ruby/gems/1.8/gems/cucumber-0.8.1/bin/
cucumber:8
C:/local/Ruby187/bin/cucumber:19:in `load'
C:/local/Ruby187/bin/cucumber:19
features\g_search.feature:6:in `Given I am on the home page'
When I fill in "q" with "ruby" # features/step_definitions/
web_steps.rb:35
And I press "Search" # features/step_definitions/
web_steps.rb:23
Then I should see "Ruby" # features/step_definitions/
web_steps.rb:143

Failing Scenarios:
cucumber -p selenium features\g_search.feature:5 # Scenario: search
something

1 scenario (1 failed)
4 steps (1 failed, 3 skipped)
0m0.250s

On Jun 24, 1:47 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:
> On Thu, Jun 24, 2010 at 7:43 PM, ParvG <parvinder.gho...@gmail.com> wrote:
> > Hi,
>
> > I'm running into the following exception, when I try to execute a
> > feature (any feature):
> > No such file or directory - /dev/null (Errno::ENOENT)
>
> What's the full --backtrace (pass that option to cucumber)
> Are you on windows?
>
> > (eval):2:in `fill_in'
> > ./features/step_definitions/web_steps.rb:37:in `/^(?:|I )fill in
> > "([^"]*)" with
> > "([^"]*)"$/'
> > features\g_search.feature:7:in `When I fill in "q" with "ruby"'
>
> > Failing Scenarios:
> > cucumber features\g_search.feature:5 # Scenario: search something
>
> > 1 scenario (1 failed)
> > 4 steps (1 failed, 2 skipped, 1 passed)
> > 0m0.140s
>
> > I'm trying to run this test using in selenium profile, but never see
> > the selenium server started.  I have gone through making all the
> > config changes, but am not able to shake this error off.  I have tried
> > the setup suggested in this posthttp://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium,

aslak hellesoy

unread,
Jun 24, 2010, 2:32:44 PM6/24/10
to cu...@googlegroups.com
On Thu, Jun 24, 2010 at 8:09 PM, ParvG <parvinde...@gmail.com> wrote:
> I am on windows.
> Ruby 1.8.7-patch249
> rubygems 1.3.7
> cucumber 0.8.1
> cucumber-rails 0.3.2
> selenium-client 1.2.15 (i tried 1.2.18 also)
> webrat 0.5.3
>
> Here's the full exception backtrace:
>

Looks like one of your gems (webrat or selenium-rc probably) wants to
write to /dev/null
Webrat 0.7.1 does that, but it writes to NUL if you're on windows.

I recommend you upgrade webrat, and if that doesn't help, search in
your gems for /dev/null

Aslak

ParvG

unread,
Jun 24, 2010, 2:50:03 PM6/24/10
to Cukes
This seems like a bug in rails 2.3.5 (the version i'm using) and seems
like its been fixed in 2.3.6.

problem source: is C:/local/Ruby187/lib/ruby/gems/1.8/gems/
activesupport-2.3.5/lib/active_suport/core_ext/kernel/reporting.rb:
38:in `reopen' - its expecting the RUBY_PLATFORM to be /mswin/, my
RUBY_PLATFORM = "i386-mingw32"

After patching the above source, i'm now running into the following
error:


C:\local\projects\webratTest>cucumber features/g_search.feature -p
selenium
Using the selenium profile...
C:/local/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/
gem_dependency.rb:
119:Warning: Gem::Dependency#version_requirements is deprecated and
will be remo
ved on or after August 2010. Use #requirement
Strategy is : truncation and ORM is active_record
Feature: Search Google
As a user
I want to see info on something

Scenario: search something # features\g_search.feature:5
Exception in thread "main" java.lang.NumberFormatException: For input
string: "timeout30"
at java.lang.NumberFormatException.forInputString(Unknown
Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at
org.openqa.selenium.server.cli.RemoteControlLauncher.parseLauncherOpt
ions(RemoteControlLauncher.java:122)
at
org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:18
3)
Given I am on the home page # features/step_definitions/
web_steps.rb:15
Error while running >>java -jar "C:/local/Ruby187/lib/ruby/gems/
1.8/gems/w
ebrat-0.5.3/vendor/selenium-server.jar" -port 4400 -timeout timeout30
&<< (Runti
meError)
(eval):2:in `visit'
./features/step_definitions/web_steps.rb:16:in `/^(?:|I )am on (.
+)$/'
features\g_search.feature:6:in `Given I am on the home page'
When I fill in "q" with "ruby" # features/step_definitions/
web_steps.rb:35
And I press "Search" # features/step_definitions/
web_steps.rb:23
Then I should see "Ruby" # features/step_definitions/
web_steps.rb:143

Failing Scenarios:
cucumber -p selenium features\g_search.feature:5 # Scenario: search
something

1 scenario (1 failed)
4 steps (1 failed, 3 skipped)
0m0.187s

On Jun 24, 2:32 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages