I have tried a few different tutorials for Hirb but rails c
is stubbornly refusing to load automatically using .irbrc.
Here's what I've been doing.
# From app directory
mate .irbrc
# Added to .irbrc
require 'rubygems'
require 'hirb'
extend Hirb::console
Hirb::View.enable
rails c development / rails c production / rails c test
Works as expected
rails c
User.last # Doesn't work
Hirb::View.enable
true
User.last # Does work
The odd thing is this: when I load rails c development
, rails c production
or rails c test
, Hirb starts working straight away. But, running rails c
and it needs Hirb::View.enable
first. I find this behavior very strange - could you help shed some light? Thank you.