No commit activity in last 3 years
No release in over 3 years
Enhance rails console by using amazing_print, pry and several pry plugins. And useful prompt tweaks. Makes rails console amazing by default. Forked from xunker/amazing_rails_console
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 10.0
~> 3.2

Runtime

 Project Readme

Make Your Rails Console Amazing

This gem was inspired by Using pry in production, jazz_hands and jazz_fingers.

The pros of amazing_rails_console are:

  • Less gem dependances (Only pry-rails and amazing_print other than rails. The rest are optional)
  • Simpler prompt modification (Similar to the default prompt you're already familiar with)
  • No need to worry about configuration (because there are not much options anyway)

Installation

Gemfile:

gem 'amazing_rails_console'

In terminal:

bundle
rails g amazing_rails_console:install # This will include dependency gems to the gemfile
# you should review your Gemfile at this point (and adjust if needed)
bundle
spring stop # to restart spring, if you are using it
rails c

Features

Show Rails env and project name in the prompt

Prevents you from accidentally changing production data to the wrong project.

Beautiful formatting with pry and amazing_print

Make it easy to read. Reduce the pain while debugging.

# Try following statements in rails console:
[:apple, :orange, :banana]
{ a: 1, b: 2, c: 3 }
1.methods
(1..100).to_a
ap (1..100).to_a, limit: 5

Print table in console

With Hirb (optional enhancement)

Very handy when you need to paste some data into issue tracking system.

Debugger

With pry-byebug (optional enhancement)

Insert binding.pry (break point) to start debugging. See pry-byebug For detail.