- Supported Ruby & Rails Versions
- Installation
- Usage
- Customization
- Development
- Running Tests
- Roadmap
- Releasing a New Version
- Contributing
- License
- Thank You for Using Errormoji!
Example of Errormoji error messages:
- (╯°□°)╯︵ ┻━┻ Something went wrong!
- (ಥ_ಥ) File not found!
- (ಠ益ಠ) Invalid input!
- Ruby: 3.0+
- Rails: 7.0+
Add to your Gemfile:
bundle add errormojiOr install directly:
gem install errormojiEnable emoji decoration globally:
require "errormoji"
Errormoji.enable_global_exceptions!Disable emoji decoration:
Errormoji.disable_global_exceptions!Enable or disable Errormoji per environment in your Rails config:
# config/environments/development.rb
Rails.application.config.errormoji.enabled = true
# config/environments/production.rb
Rails.application.config.errormoji.enabled = falseLegacy config is still supported:
Rails.application.config.errormoji_enabled = trueNote:
While Errormoji makes your errors way more fun (⌐■_■), we don’t recommend enabling it in production—unless your ops team loves errormojis as much as you do! Decorated error messages might confuse your logs, monitoring tools, or that one serious developer on your team. But hey, you’re the boss: enable Errormoji wherever you want!
Set your own emojis:
Errormoji.emojis = ["😄", "😢", "😡"]Add emojis to your current list:
Errormoji.emojis << "🤖"
Errormoji.emojis += ["🔥"]Build your emoji set incrementally!
After checking out the repo, run:
bin/setupUse bin/console for an interactive prompt.
Run the test suite with:
bundle exec rake testEnable verbose Rails request logging for dummy-app integration tests only when needed:
bundle exec rake test:verboseYou can still use the environment variable directly if preferred:
ERRORMOJI_VERBOSE_TEST_LOGS=true bundle exec rake testRails integration coverage is split into two focused files:
test/integration/railtie_test.rbvalidates Railtie config behavior.test/integration/railtie_exceptions_test.rbvalidates real Rails-raised exceptions from a minimal dummy app are decorated when enabled and plain when disabled.
The Rails exception integration tests boot a minimal app from test/dummy/ and exercise representative Rails exception scenarios through both raised-exception and middleware-rescued request paths.
- CI currently validates Rails integration against one Rails stream (latest resolvable Rails with Ruby 3.4); expand this to a Rails-version matrix.
- Add configurable severity levels (for example, map
warn/error/fatalto different emoji sets). - Support patching only specific exception classes instead of patching globally.
Errormoji uses Semantic Versioning.
To release a new version:
- Update the version number in
lib/errormoji/version.rb. - Run:
This will tag, push, and publish the gem to rubygems.org.
bundle exec rake release
Bug reports and pull requests are welcome on GitHub. Please follow our Code of Conduct.
Open source under the MIT License.
We appreciate you bringing a little more fun to your error messages. Happy coding!
(╯°□°)╯︵ ┻━┻