Code Monkey home page Code Monkey logo

awesome_rails_console's Introduction

Make Your Rails Console Awesome

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

The pros of awesome_rails_console are:

  • Less gem dependances (Only pry-rails and awesome_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 'awesome_rails_console'

In terminal:

bundle
rails g awesome_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 awesome_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.

awesome_rails_console's People

Contributors

ascendbruce avatar errakeshpd avatar guillaumezaugg avatar jason-cooke avatar xunker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.