Rename Rails App

Rename your app the simple way.
Icons/chart bar
Used 83 times
Created by
B Ben Latz

After it renames your app, it will change the directory it lives in. To get back into your Rails app:
cd .. 
cd YourNewNameHere

Then you can remove the rename gem via
bundle remove rename

Run this command in your Rails app directory in the terminal:

rails app:template LOCATION=""
Template Source

Review the code before running this template on your machine.

name = ask("Enter new name for your Rails app:")
puts "💎 Adding gem 'rename'"
run "bundle add rename"
rails_command "g rename:into #{name}"
# puts "🧹 Removing gem 'rename'"
# run "bundle remove rename"
Richard Logwood
Thanks Ben - I've forked this to support Rails 6 via a patched rename gem, see Rename Rails App - for Rails v6