Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling on install #59

Open
eelcoj opened this issue Feb 25, 2025 · 0 comments · May be fixed by #63
Open

Improve error handling on install #59

eelcoj opened this issue Feb 25, 2025 · 0 comments · May be fixed by #63
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@eelcoj
Copy link
Collaborator

eelcoj commented Feb 25, 2025

When you run the install command with an incorrect library name: rails g rails_icons:install --libraries=herocions it breaks:

 undefined method 'initializer_config' for nil (NoMethodError)

libraries.map { RailsIcons.libraries[_1.to_sym].initializer_config }.join("\n")

This is confusing as the error message is not correct.

Should improve checks on correct library names in the various generators.

Create a new error: https://github.com/Rails-Designer/rails_icons/blob/main/lib/rails_icons/errors.rb and check in each generator: https://github.com/Rails-Designer/rails_icons/tree/main/lib/generators/rails_icons

@eelcoj eelcoj added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Feb 25, 2025
@eelcoj eelcoj self-assigned this Feb 27, 2025
@eelcoj eelcoj linked a pull request Feb 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant