QuBiT / cucumber-netbeans-plugin

Plugin / Module which allow Syntax Highlighting and many more in NetBeans with .feature Files
MIT License
50 stars 19 forks source link

Netbeans doesn't run features - using 1.8.2 #28

Open vinpereira opened 13 years ago

vinpereira commented 13 years ago

hi,

using cucumber 0.8.5, gherkin 2.1.4 and have this error message: cannot run program "cucumber": java.io.IOException: error=2

I do what is said http://wiki.github.com/QuBiT/cucumber-netbeans-plugin/code-execution and the error is still there...

QuBiT commented 13 years ago

hi,

if you are on windows,

did you set the ruby\bin-directory to the system "path" variable so that windows knows where to look for cucumber?

if you are not on windows, could you give me some additional information?

vinpereira commented 13 years ago

hi,

sure!!

I'm using in Ubuntu 10.04 as a guest (by VirtualBox 3.2.8) in Windows host. Using too NetBeans 6.9.1 and Rails 2.3.8 Installed Cucumber 0.8.5 e Gherkin 2.1.4 by NetBeans RubyGems in the JRuby embebbed Installed too in Ruby 1.9.2 and 1.8.7 in RVM...

I created a project, create the DB and script/generate cucumber... this is all ok Then I create a .feature and write a scenario. When I run the feature, the error occurs

I do what is said in the link (on my first comment) and the error is still there... (Yes, I try with Ruby and JRuby in the options)

thanks for the help :)

QuBiT commented 13 years ago

Hi,

have you tried running cucumber from the console manually? (this is what my module tries to do.). Try to open a console, cd to your directory where your project is and run the command manually:

"cucumber features/filename.feature -p default"

If this works, then also running a feature inside NetBeans should work.

on my ubuntu 10.04 laptop i've installed netbeans and manually installed version 1.8.2 of the module from the downloaded nbm file,

and I do NOT get this error.

Did you see the output window at all? When you run a feature then an output window should be opened (below the editor window).

And it should look like this:

  Output - Cucumber: filename
  Output of running [cucumber , /path/to/my/file, -p, default] is:
  --- START ---
  ... Normal Cucumber Output ...
  --- END ---

Is your error reported from the output window or from NetBeans?

REMARK: If you work (write and develop code and features) on ubuntu why don't you use the console for running features? ( the module does not provide the same fancy output like the console with colors, ...., it is just a simple "take the textual output of the console and show it inside NetBeans"-Feature )

vinpereira commented 13 years ago

Hi and sorry for all this,

first for the REMARK :) I do masters in computing and use through the terminal (and gedit). However, my supervisor asked me to teach Ruby, Rails and testing (TDD and BDD) for students at undergraduate and postgraduate courses. He insists that have to be all within an IDE, which, if not via IDE is because the technology isn't cutting edge. If the world uses it, so it has to work in an IDE... things of old people.

About the problem: By terminal works fine (I only not tested with the embebbed JRuby in NetBeans)... tested with Ruby 1.9.2, 1.8.7 and JRuby 1.5.2 in RVM. The console output can be see here: http://tinypic.com/r/2hrzeh3/7

thanks and sorry for the problems

QuBiT commented 13 years ago

Hi,

thanks 4 the screenshot,

one quick question (and maybe dirty solution ^^ ): have you tried to run a feature WITHOUT setting the project path in the options (up to v1.8.1 this feature was not implemented, as it worked quite well if it was the only active project inside your netbeans IDE, but I added this as it was requested by another person)

AGAIN:

Given I use my old but running ubuntu 10.04 laptop
And I've installed netbeans 6.9.1 from the netbeans.sh installer from netbeans.org 
And I installed the downloaded module v.1.8.2
And I created a new English sample file from the new file dialog in the same way as you
And I used the project path and also without those options
And I tried jRuby and Ruby both installed WITHOUT RVM
When I right clicked on the file
And I selected "Run Feature"
Then I got NO error
And I do not see that exception

for debugging:

could you click on the link in the exception and copy the exception trace so that I am able to debug this code. (as I still can't reproduce your error)

can you confirm that your path (which is shown in the exception) is correct and you have access (should be true)

It seems to me that this error is all about your configuration and setup (I do not use RVM on my ubuntu laptop, so maybe you try to use it without RVM ...)

funny thing about your supervisor: poor students, if they are not able to learn things without an IDE. poor supervisor, if he waits for a full featured IDE which is most likely available when all others already have learned to use this technology and have advanced to the next hot topics. (you can tell him to wait for 10 years then there maybe will be a perfect free IDE for cucumber ;) )

Cheers

vinpereira commented 13 years ago

Hi dude,

I tried the AGAIN section hehehehe... nothing... without RVM... with JRuby and Ruby in "system" and JRuby embebbed... same error

for the debugging: I clicked in the link and the icon vanished... nothing opened/happened... re-run the features and same error... the only information is that in the image on the other comment. Sorry

but don't worry, I will install a new Ubuntu in the VirtualBox and try again. You can close the issued. The problem is here!! :)

thanks for the support and sorry for all the work ;)

QuBiT commented 13 years ago

hi,

generally I do not want to give up anything, but when I am unable to debug or reproduce that error ... it is very hard for me to help.

I will keep this issue open until you got your system working. feel free to let me know if it works then, and if not, feel free to write again any additional information for finding and solving that problem.

I'll keep my fingers crossed until then for you. ;-)

Cheers

eviweb commented 10 years ago

Hi,

I'm coming from the future and I've got a solution to your problem...

it seems this issue comes from that the value of the PATH environment variable in Netbeans does not match the one in shell. I've solved this issue by creating a user custom configuration file for netbeans : $HOME/.netbeans/[NETBEANS_VERSION_NUMBER]/etc/netbeans.conf and adding this : netbeans_default_options="${netbeans_default_options} -J-Duser.path=$PATH"

at this time i use netbeans 8.0 under ubuntu 12.10 (time to upgrade), java 1.8, ruby installed with rvm and cucumber installed using gem... All that shouldn't be done :(