Rails Icons
Add Rails Icons even easier
Used 7 times
E
Eelco from Rails Designer
Usage
Rails Icons is a Ruby on Rails gem to add SVG icons from different libraries (Heroicons, Lucide Icons and Feather Icons), or your own custom icon set. See the docs for more details.
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/VD7sa6"
Template Source
Review the code before running this template on your machine.
gem("rails_icons")
Bundler.with_unbundled_env { run "bundle install" }
library = ask("Which icons library to use? `heroicons` or `lucide`")
after_bundle do
rails_command("generate rails_icons:initializer")
rails_command("generate rails_icons:sync #{library}") if %w[heroicons lucide].include? library
end