Flak DiNenno
Flak DiNenno

Reputation: 2352

How to rename project in RubyMine

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:

Any thoughts? tia

Upvotes: 13

Views: 5750

Answers (5)

miiimooo
miiimooo

Reputation: 131

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" />

Upvotes: 2

Kabir Sarin
Kabir Sarin

Reputation: 18526

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.

Upvotes: 2

WiredIn
WiredIn

Reputation: 4227

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

Upvotes: 8

Flak DiNenno
Flak DiNenno

Reputation: 2352

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

Upvotes: 2

CrazyCoder
CrazyCoder

Reputation: 401965

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.

Upvotes: 32

Related Questions