Skip to content

always enable `pp` on the Rails console #1118

Merged
merged 1 commit into from May 19, 2011

3 participants

@amatsuda
Ruby on Rails member

I believe this is as useful as ActiveRecord::Base.logger = Logger.new(STDERR) thing (yes, I really love that too!)

@jasonnoble

I'm not seeing the issue with Rails 3.0.7.

~/Projects $ rails -v
Rails 3.0.7
~/Projects $ rails new blah
create

create README
create Rakefile
create config.ru
[...]

~/Projects $ cd blah
~/Projects/blah $ bundle
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.7)
[...]

~/Projects/blah $ rails c
Loading development environment (Rails 3.0.7)
ruby-1.9.2-p180 :001 > pp [1,2,3]
[1, 2, 3]
=> [1, 2, 3]
ruby-1.9.2-p180 :002 > require 'pp'
=> nil
ruby-1.9.2-p180 :003 >

@amatsuda
Ruby on Rails member

No, that's because you're on Ruby 1.9.2.
1.8.7 does not automatically require 'pp' on irb, and I'm not sure for other Ruby implementations.

@NZKoz NZKoz merged commit feddf31 into rails:master May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.