Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make awesome_print be the default in the heroku console?

How can I make awesome_print be the default in the heroku console?

When I type Model.all in the console, I would like awesome_print to display the results without having to type ap Model.all.

like image 710
webmagnets Avatar asked Jan 14 '13 23:01

webmagnets


2 Answers

The following gem combination seems to accomplish it in Rails 4.

# for the pretty
gem 'pry'
gem 'pry-rails'
gem 'pry-doc'
gem 'pry-awesome_print'
gem "awesome_print"

You can also remove from your .pryrc the following lines and it will work anyway :

require 'awesome_print'
AwesomePrint.pry!

Happy printing!

like image 183
Trip Avatar answered Nov 07 '22 11:11

Trip


Try installing pry, it has functionality like awesome print and more, and has instructions for installing into a rails application: http://pryrepl.org/

like image 33
Will Avatar answered Nov 07 '22 12:11

Will