rails plugin install git://github.com/get/Rename.git
will allow us to rename only rails 3 app
Is there any gem available to rename Rails 4 app.
If not, suggest me the better way to rename.
rails plugin install git://github.com/get/Rename.git
will allow us to rename only rails 3 app
Is there any gem available to rename Rails 4 app.
If not, suggest me the better way to rename.
I just used this
rename
gem in a basic rails 4 app:https://github.com/morshedalam/rename
This is quite a bit different to
get
's version.Easy enough to use:
Add this to Gemfile:
And run:
Seemed to the trick,
It also updated my rubymine .idea project settings :)
In Rails 5.x, doing it manually
using ag (https://github.com/ggreer/the_silver_searcher), there are files that use the default folder name (if generated via rails new .)
three basic files, relative to root of project, need to be updated:
There are sure to be more locations as mentioned previously such as database etc. Hope this helps.
Since rails 4.1.x, if you want to rename your application, the only two files you need to modify are
config/application.rb
:and
config/initializers/session_store.rb
(optional):For Rails 4.0.x you can use the
rename
gem and execute the following command:This will update the necessary files for you:
For Rails 5
Require
config/application.rb
change the module nameOptional
config/initializers/session_store.rb
(in Rails.application.config.session_store) change the session nameapp/views/layouts/application.html.erb
You can change the<title>...</title>
, if it is not already doneIn Rails 4.2 just change in
application config
fileand config/initializers/session_store.rb (optional):
then restart your server.
That's it!
Here is a gem specifically for Rails 4 https://github.com/negativetwelve/rails-rename (I haven't used it but it seems fine)
The other gems listed here only target Rails 3