author avatar


Thu Jun 20 2024

My Rails application is named xyz. When I tried to create a scaffold with the same name as the application, it caused a below error.

The name 'Xyz' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative or use --skip-collision-check or --force to skip this check and run this generator again.

To fix this, I changed the module name in application.rb to abc. After making this change, everything worked. It's always best to avoid using the same name for both the model and the application.

#rails-naming-convention #rails