How to change a Ruby on Rails application name?

前端 未结 8 1218
渐次进展
渐次进展 2020-11-30 19:33

I have a Ruby on Rails application that was created using:

rails new old_name -d mysql

Now I want to change the application name to be

相关标签:
8条回答
  • 2020-11-30 19:57

    in Rails 3, the application class is defined in config/application.rb, and referred to in your environment files (config/environment.rb, config/environments/*.rb) and config/routes.rb. I think that's it, but you should find out pretty quickly from rails server if you missed one. :)

    • config/application.rb
    • config/enviroment.rb
    • config/environments/*.rb
    • config/routes.rb

    That said, unless you've got a very specific reason for wanting it changed, I wouldn't bother. Doesn't really affect the application in any other way.

    0 讨论(0)
  • 2020-11-30 20:00

    On rails 4

    Add

    gem 'rename'
    

    to Gemfile then do

    bundle install
    

    After bundle install

    rails g rename:app_to name_of_app
    
    0 讨论(0)
提交回复
热议问题