Basic checks
What's broken?
Running the ruby_llm rails generator with the following command rails generate ruby_llm:install chat:AiConversation message:AiChatMessage model:AIModel generate a class with name CreateAIModels which causes rails to crash with the error uninitialized constant CreateAiModels
How to reproduce
- install ruby_llm
- run
rails generate ruby_llm:install chat:AiConversation message:AiChatMessage model:AIModel
- run
rake db:migrate
Expected behavior
The generator creates a file named xxx_create_ai_models.rb with class name class CreateAiModels < ActiveRecord::Migration[8.0]
What actually happened
The origin of the issue comes from the file name and class name generation. The generator creates a file named xxx_create_ai_models.rb and the class name class CreateAIModels < ActiveRecord::Migration[8.0]
Environment
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
gem "ruby_llm", "~> 1.12"
Basic checks
What's broken?
Running the ruby_llm rails generator with the following command
rails generate ruby_llm:install chat:AiConversation message:AiChatMessage model:AIModelgenerate a class with nameCreateAIModelswhich causes rails to crash with the erroruninitialized constant CreateAiModelsHow to reproduce
rails generate ruby_llm:install chat:AiConversation message:AiChatMessage model:AIModelrake db:migrateExpected behavior
The generator creates a file named
xxx_create_ai_models.rbwith class nameclass CreateAiModels < ActiveRecord::Migration[8.0]What actually happened
The origin of the issue comes from the file name and class name generation. The generator creates a file named
xxx_create_ai_models.rband the class nameclass CreateAIModels < ActiveRecord::Migration[8.0]Environment
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
gem "ruby_llm", "~> 1.12"