How to rename rails 4 app?

后端 未结 9 1682
醉酒成梦
醉酒成梦 2020-12-02 05:52

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.

相关标签:
9条回答
  • 2020-12-02 06:10

    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:

    • config/cable.yml > channel_prefix:
    • config/environments/production.rb > # config.active_job.queue_name_prefix
    • package.json > name

    There are sure to be more locations as mentioned previously such as database etc. Hope this helps.

    0 讨论(0)
  • 2020-12-02 06:11

    Add

    gem 'rename' to Gemfile

    then

    bundle install

    After that

    rails g rename:app_to name_of_app
    

    And if you are using mongoid then you need to rename the database name in config/mongoid.yml

    0 讨论(0)
  • 2020-12-02 06:12

    For rails 5.2

    Add gem 'rename' to the gemfile

    bundle install

    rails g rename:into your_new_app_name

    0 讨论(0)
提交回复
热议问题