Skip to content

Errormoji — A Ruby gem that decorates error messages with ASCII emojis for more fun and expressive debugging. Works standalone or with Rails. Flip the table on boring errors! (╯°□°)╯︵ ┻━┻

License

Notifications You must be signed in to change notification settings

BabsLabs/errormoji

Repository files navigation

Errormoji

Build Status

Table of Contents

Example of Errormoji error messages:

  • (╯°□°)╯︵ ┻━┻ Something went wrong!
  • (ಥ_ಥ) File not found!
  • (ಠ益ಠ) Invalid input!

Supported Ruby & Rails Versions

  • Ruby: 2.7–3.4
  • Rails: 6.x, 7.x

Installation

Add to your Gemfile:

bundle add errormoji

Or install directly:

gem install errormoji

Usage

Enabling & Disabling Emoji Decoration

Enable emoji decoration globally:

require "errormoji"
Errormoji.enable_global_exceptions!

Disable emoji decoration:

Errormoji.disable_global_exceptions!

Rails Integration

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 = false

Note:

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!


Customization

Set your own emojis:

Errormoji.emojis = ["😄", "😢", "😡"]

Add emojis to your current list:

Errormoji.emojis << "🤖"
Errormoji.emojis += ["🔥"]

Build your emoji set incrementally!


Development

After checking out the repo, run:

bin/setup

Use bin/console for an interactive prompt.


Running Tests

Run the test suite with:

bundle exec rake test

Releasing a New Version

Errormoji uses Semantic Versioning.

To release a new version:

  1. Update the version number in lib/errormoji/version.rb.
  2. Run:
    bundle exec rake release
    This will tag, push, and publish the gem to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub. Please follow our Code of Conduct.


License

Open source under the MIT License.


Thank You for Using Errormoji!

We appreciate you bringing a little more fun to your error messages. Happy coding!

(╯°□°)╯︵ ┻━┻

About

Errormoji — A Ruby gem that decorates error messages with ASCII emojis for more fun and expressive debugging. Works standalone or with Rails. Flip the table on boring errors! (╯°□°)╯︵ ┻━┻

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published