0

I have a file that I want to run in this directory:

C:\ruby\App\bin\cucumber

And I have a file that I want to pass it in this directory:

C:\ruby\App\features\creating_projects.feature

All works fine when I explicitly cd to /bin and run the file:

C:\ruby\App>cd bin
C:\ruby\App\bin>cucumber ..\features\creating_projects.feature

But I want to be able to run it being in my app's root directory. But this doesn't work. It says, "bin\cucumber" is not a program, command of file:

C:\ruby\App>bin\cucumber features\creating_projects.feature
# error

How can I run the file this way?

Green
  • 28,742
  • 61
  • 158
  • 247

2 Answers2

1

Have you tried:

C:\ruby\App>.\bin\cucumber ..\features\creating_projects.feature

?

Lave Loos
  • 1,252
  • 1
  • 11
  • 15
  • Yes, I tried it. I also tried to do it with `start` command. The same result - `not a program` – Green Jun 27 '13 at 14:36
  • 1
    Hmm, it seems like you're calling the directory instead of the file (That's why I thought you could try the ".\" before bin. Anyways: this might help: http://stackoverflow.com/questions/1422380/how-to-i-launch-a-ruby-script-from-the-command-line-by-just-its-name – Lave Loos Jun 27 '13 at 14:45
1

I'm not sure, but maybe you should add file extension

C:\ruby\App>bin\cucumber.??? features\creating_projects.feature

TulaGingerbread
  • 435
  • 5
  • 15
  • The thing is that that file (`cucumber`) doesn't have an extension. – Green Jun 27 '13 at 14:34
  • I thought so. I think, there is no association with that type of file. Windows don't know what program use to run it. Which application do you use to start such files? – TulaGingerbread Jun 27 '13 at 14:47