Cannot run cucumber features in a file because the Javascript debugger is always started
Rubymine 7.0.2 ; Ubuntu 14.10
When I left-click on a single cucumber feature file and select "Run xxx.feature" it fires up that test in a Javascript debugger session (which opens up a tab in my Firefox browser) instead of simply running it in a headless browser (capybara-webkit) like it has done for ages. I did *not* select "Debug xxx.feature".
Can someone see if this is a new bug? Not being able to run the cukes in a feature file is a real... well, it's really, really B-A-D.
Thanks,
Larry
Please sign in to leave a comment.
Larry,
Please remove the JavaScript Debug Run Configuration from Run|Edit Configurations, select the feature in the project tree, right-click and select run. If the result is the same please close the project, remove .idea from the project's folder and reopen it in the RubyMine. Also one of the possible reason may be the wrong association *.feature files in the Settings| Editor|File Types (remove it from Registered Patterns for JavaScript). Then if the problem is reproduced attach idea.log (Help | Show Log in).
Hi Anna,
Thanks for replying because being able to run my cucumber features by right-clicking on a file is a *must-have feature* for me. (And it has worked for years; don't know why all of a sudden I am experiencing this weird behavior.)
Anyway, I did delete the Javascript Debug Run Configuration like you suggested but the problem still remains - sometimes. (Aarrgghh!!)
Sometimes when I right-click a feature file it runs fine. Let's say the file is called 'links.feature'. I notice that the entry in the context menu is "Run links: StupidTuesday..." (StupidTuesday is the name of my project) When I run the file it is run in my IDE and the file is added to the "Cucumber" group in the Run/Edit Configurations list. Everything works just like it used to in these cases.
Other times when I right-click a feature file it fires up an empty tab in my FireFox browser and the file is added to the Run/Edit Configurations list in the "Javascript Debug" group. Interestingly enough, if the file is called "links.feature" (like above) the entry in the context menu is "Run links.feature", not "Run links: Stupidtuesday..." as it is when it works.
I see that you said to delete /.idea from the Project's folder and reopen Rubymine again. I did not do this because there are 21 files in that directory and I am afraid that I will lose a whole bunch of settings. Will I? Is it really safe to delete this directory and still have Rubymine run the way it used to (minus the Cucumber/Javascript-debug problem)?
Thanks,
Larry
Is it possible to provide sample project? It would help us to reproduce and fix the problem.
I doubt it because like I said I have always been able to right-click and run the cucumber features for years in a headless browser. And besides, creating a sample project that can reproduce this problem is not a trivial task, and I, like everyone else, am swamped with things to do as it is.
Can I safely delete the .idea directory like Anna recommended? If not, can't I just send you a log file or something?
Thanks,
Larry
It's save. After you delete .idea folder you will have to configure SDK and some other project settings. Let's start with it
Hi Andrey,
Well, I deleted the .idea directory and I can now run my cucumber features. But I appear to have lost a LOT of settings, so I am not sure how good of a fix this was. I don't really know how many settings and preferences and "fine-tuning" I have lost. One thing I can see is that I had a whole bunch of Run/Config settings defined, e.g. depending on certain tags and/or directories, and they are all gone.
Heck, it didn't even have the right Ruby and Gemset selected. And now I see my "Ignored Files" list was hosed. Aw man, and that's just the beginning I'm sure...
Anyway, this was a pretty destructive "fix". If it appears too destructive can I restore the old settings by deleting the new .idea directory and replacing it with the old one? Seems like I should be able to, but figure it's safer to ask first.
Or better yet, can you tell me what /.idea files I can look through so that I might "see" some of the settings, (e.g. in XML) that I had in my old environment.
Thanks,
Larry
Yes, you could replace new .idea files with old one. This folder stores only settings of your project. (Ruby SDK, gemset, breakpoints). Global settings like keymap, plugins, livetemplates and some others stored in RM Config. So you wouldn't lose these settings when you remove or replace .idea folder.
I do not recommend modifying xml files in .idea folder. This could cause more serious problems.
If you decide to restore old version of .idea folder. Check run configuration of Cucumber feature. Make sure that “Before launch” section doesn’t contain anything related to JS debugger.
Attachment(s):
RunConfig.png
Okay, thanks a lot, Andrey!