Hirb没有正确显示在Rails 4中

时间:2015-06-05 21:12:44

标签: ruby-on-rails pry hirb

我安装了Hirb,并希望它附带漂亮的表格视图。 我检查过pry,Rails和Hirb的版本,他们应该工作。我也试图重新安装宝石。运行Hirb.enable后,我看不到漂亮的视图:

➜  awections git:(master) ✗ rails c
/Users/RJ/.rvm/gems/ruby-2.1.3/gems/activesupport-    4.2.0/lib/active_support/dependencies.rb:274:in `require'
2.1.3 (main):0 > Hirb.enable
=> true
2.1.3 (main):0 > Product.all
  Product Load (1.0ms)  SELECT "products".* FROM "products"
=> [#<Product:0x007fb8fec3b838
  id: 1,
  name: "Hammer",
  image: "http://s.hswstatic.com/gif/hammer-1.jpg",
  created_at: Fri, 05 Jun 2015 19:48:19 UTC +00:00,
  updated_at: Fri, 05 Jun 2015 19:48:19 UTC +00:00,
  user_id: nil>,
 #<Product:0x007fb8fec3b680
  id: 2,
  name: "Screw Driver",
  image: "http://images.clipartpanda.com/screwdriver-clipart-free-vector-bigredsmile-a-screwdriver-clip-art_115848_Bigredsmile_A_Screwdriver_clip_art_hight.png",
  created_at: Fri, 05 Jun 2015 19:49:13 UTC +00:00,
  updated_at: Fri, 05 Jun 2015 19:49:13 UTC +00:00,
  user_id: nil>]
2.1.3 (main):0 >

任何见解都将受到赞赏。

0 个答案:

没有答案