Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a Rails plugin called <a href="https://github.com/get/Rename">Rename</a> that does this. It hasn't been updated in 2 years, but it appears to mostly work. It screws up CamelCaseNames, but in a consistent way.</p> <p>Optionally, just do a <code>grep</code> like in my example, and change those files manually (see below for list of files).</p> <pre><code>$ rails new ProjectToRename $ cd ProjectToRename $ grep -ri 'project_?to_?rename' . ./config/routes.rb:ProjectToRename::Application.routes.draw do ./config/application.rb:module ProjectToRename ./config/initializers/session_store.rb:ProjectToRename::Application.config.session_store :cookie_store, key: '_ProjectToRename_session' ./config/initializers/session_store.rb:# ProjectToRename::Application.config.session_store :active_record_store ./config/initializers/secret_token.rb:ProjectToRename::Application.config.secret_token = '69761de6e4534f0be37fbebee8e03f1e29d6935e12591444971bccc134503d390cb8b5587d7750a53cc428d3d57a5894437e4b148611623a7f0ff5048aeb4579' ./config/environment.rb:ProjectToRename::Application.initialize! ./config/environments/production.rb:ProjectToRename::Application.configure do ./config/environments/development.rb:ProjectToRename::Application.configure do ./config/environments/test.rb:ProjectToRename::Application.configure do ./app/views/layouts/application.html.erb: &lt;title&gt;ProjectToRename&lt;/title&gt; ./Rakefile:ProjectToRename::Application.load_tasks ./config.ru:run ProjectToRename::Application $ rails plugin install git@github.com:get/Rename.git $ rails g rename_to SomeNewName $ grep -ri 'some_?new_?name' . ./config/routes.rb:Somenewname::Application.routes.draw do ./config/application.rb:module Somenewname ./config/initializers/session_store.rb:Somenewname::Application.config.session_store :cookie_store, key: '_ProjectToRename_session' ./config/initializers/session_store.rb:# Somenewname::Application.config.session_store :active_record_store ./config/initializers/secret_token.rb:Somenewname::Application.config.secret_token = '69761de6e4534f0be37fbebee8e03f1e29d6935e12591444971bccc134503d390cb8b5587d7750a53cc428d3d57a5894437e4b148611623a7f0ff5048aeb4579' ./config/environment.rb:Somenewname::Application.initialize! ./config/environments/production.rb:Somenewname::Application.configure do ./config/environments/development.rb:Somenewname::Application.configure do ./config/environments/test.rb:Somenewname::Application.configure do ./Rakefile:Somenewname::Application.load_tasks ./config.ru:run Somenewname::Application </code></pre> <p>You'll need to rename the top-level directory yourself:</p> <pre><code>$ cd .. $ mv ProjectToRename SomeNewName </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload