Question

I'm running Rubymine 5.4.x on Windows 7 (but that shouldn't really matter for this question) and I have managed to delete projects and seemingly rename them before, but I am stuck this time.

In the past, this is what I've done:

  1. rename all instances of your old project name in all the files in the .idea folder in your project directory.
  2. rename all instances of your old project name in all the files in the RubyMine config folder and subfolders (on windows, for RM 5.x - %USERPROFILE%\.RubyMine50\config)
  3. rename all instances of your old project name in all the files in the RubyMine system folder and subfolders (on windows, for RM 5.x - %USERPROFILE%\.RubyMine50\config)
  4. rename all FILES that contain your old project name to the new project name, a few examples - rename:
    • your actual project directory which would probably have the same name as the project to the new project name
    • the .idea/<your_project_name>.iml file

In Summary:

  • By deleting or modifying these files/folders I have managed to delete or rename the projects that appear in my "project list" in that startup screen/Create Project/Open Project Modal for RubyMine, and in the ReOpen Projects menu.

  • However, this time around I can't get the name of this particular project rename... that is it appears with the correct path in these lists, but the incorrect name.

  • Furthermore, the incorrect name appears in my Project ToolWindow once the IDE is launch, although directly to the right of it in parenthesis is the correct path.

Any thoughts? tia

Était-ce utile?

La solution

To rename a project edit .idea/.name file manually.

There is a feature request to add Rename Project action to a File menu, please vote.

Autres conseils

Updated answer done on RubyMine 6.3.3 when I wanted to rename the project directory:

  1. Close RubyMine
  2. Rename project directory to desired name
  3. Delete the .idea folder
  4. Reopen renamed project directory in RubyMine

I found this to be easier than combining the steps listed on the question and the accepted answer

OK... I just figured it out... IN ADDITION to everything above... you need to rename the .name file (it's just one line with the name of your project) in the .idea directory in the root directory of your project

In addition to modifying the .idea/.name file, there is also a .idea/<project name>.iml file. Open this, do a find/replace with <project name> and <new project name>, then rename this file as well.

Quit RubyMine, and reopen it. This will update everything. In your source control you'll notice a lot of other files which automatically got updated as well.

The .name does no longer exist in my version of RubyMine (2019.3)

The File|Rename project.. will automatically pick up the folder name change (if you changed it outside of RubyMine when it was closed)

Additionally, I had to rename the <project name>.mlt file in the .idea folder and change the references to it in idea/modules.xml (search and replace old project name to new project name)

<module fileurl="file://$PROJECT_DIR$/.idea/<PROJECT NAME>.iml" filepath="$PROJECT_DIR$/.idea/<PROJECT NAME>.iml" />
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top