Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use hirb rails gem [closed]

Tags:

gem

[Changes]

  • the problem was not the typo of 'enale' instead of 'enable'
  • the installation goes without problem with the --no-ri --no-rdoc flags
  • now the doing require enable gives an error instead of false (have no idea why)

I am having some trouble using the Gem hirb for formatting the output of rails console.

$ gem install hirb --no-ri --no-rdoc
Successfully installed hirb-0.6.2
1 gem installed

$ rails c
Loading development environment (Rails 3.2.3)
irb(main):001:0> require 'hirb'
LoadError: cannot load such file -- hirb
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_
support/dependencies.rb:251:in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_
support/dependencies.rb:251:in `block in require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_
support/dependencies.rb:236:in `load_dependency'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_
support/dependencies.rb:251:in `require'
        from (irb):1
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/comman
ds/console.rb:47:in `start'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/comman
ds/console.rb:8:in `start'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/comman
ds.rb:41:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'
irb(main):002:0>

I am running Ruby 1.9.3, Rails 3.2.3, Bundler 1.1.3, Windows 7 64 bit.

like image 829
nunos Avatar asked Apr 06 '12 22:04

nunos


1 Answers

You've made a typo, you should type Hirb.enable

Add gem hirb to Gemfile of your rails project.

like image 65
megas Avatar answered Sep 20 '22 16:09

megas