Working directory doesn't exist
I am running a rails project on RubyMine. I just migrated it to my mac from a windows machine. It was running properly on my windows. When i try to run the project I get the error message "Working Directory doesn't exist' . I do not see a "Working Directory" field for Rails project. I can see a working directory field for rake tasks and other unit test cases. How do I set my working directory for a Rails project?. What am I doing wrong. Is there something special in mac for setting working directory? Attaching the screenshot.
Attachment(s):
Screen shot 2011-02-07 at 6.01.00 PM.png
Please sign in to leave a comment.
I've filed an issue - http://youtrack.jetbrains.net/issue/RUBY-7797. Seems some bug related to settings format or etc.
* Please at first backup your ".idea" settings folder. Could you attach to the RUBY-7797 (or send my at roman.chernyatchik@jetbrain.com) issue your .idea/*.iml and .idea/workspace.xml files?
* Try to recreate run configurations for rails servers. I assume that they will be ok.
I experience the same issue on Windows 7 64bit at work. Having said that it's working ok on my home pc which is as well running on Windows 7 64 bit.
Seems like this issue is related to enviroment configuration which is shipped with RubyMine. As Roman suggested i simpy deleted it and created a new one. And voilà it works
Ditto. I've just run into the same error. Not sure I like the idea of "just create a new project solution"... and updates on this?
Adron, did you get it also in Rails server run configuration?
Well, I did just recreate the project. It appears that this happens when I open up some (not very often) existing projects.
It seems like there ought to just be a setting or file to create/set this working directory. Am I just missing it?
I also had this problem with a project copied from windows to ubuntu. The issue is that the Run Configurations that were created on the windows side contain absolute paths like c:\someproject. To fix this you do not need to recreate the project. Simple close the project then edit the workspace.xml file in your project's .idea folder and search for the term WORK DIR. In some of the VALUE attributes you will see a windows path, change them all to be $PROJECT_DIR$ then save the file and reopen the project.
Old:
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="C:\projects\rails\myproj" />
New:
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
The other option is to delete all the existing Run Configurations and recreate them, still easier than redoing the whole project.
I do think this is a bug, the Run Configurations should have relative (or OS independant) paths when created on windows.
Go to Run => Edit Configuration, from the Menu and change the "Working directory" there. The settings may not have been updated when you deleted the directory.