I tried several different guides for Hirb, but rails cstubbornly refuses to load automatically with .irbrc.
rails c
Here is what I did.
# 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 productionor rails c test, Hirb starts working right away. But by running rails cand first you need Hirb::View.enable. I find this behavior very strange - could you shed some light? Thank.
rails c development
rails c production
rails c test
Hirb::View.enable
The first argument sets ENV ['RAILS_ENV']. From what you said, you can get around this quirk by adding this to your ~ / .bashrc:
export RAILS_ENV='development'
, , , Gemfile ( hirb Gemfile, ?). .irbrc ? , (, - ~/.irbrc)?
Source: https://habr.com/ru/post/1783005/More articles:Sales are grouped by month, then by product - linqUsing the Mono C # Compiler as a Service (error) - c #Linq Query to IEnumerable ΠΠ΅ΡΠΎΠ΄ ΡΠ°ΡΡΠΈΡΠ΅Π½ΠΈΡ - c#How to reinstall BMP file resolution indicator (DPI)? - javaWhat should I learn in Silverlight? - c #Ampersand in link description text? - phpHirb doesn't work at all in rails console - ruby ββ| fooobar.comHTML5 Audio Link - html5how to authenticate web frontend in mongodb? - databaseWPF: Content Based Window Size Calculation - wpfAll Articles