rails console with wirble?

非 Y 不嫁゛ 提交于 2019-12-19 06:56:46

问题


How do i use rails console with the wirble gem? I originally had the code that wirble gives you and put it in my .irbrc

At this point, irb worked fine with wirble (color highlighting), but when i would start rails console it would give an error about wirble and halt.

I changed the irbrc code so it doesnt halt but continues on error, this at least gets rails console load but theres no color highlighting.

Any ideas what i should put? this is in my irbrc

begin 
  # load and initialize wirble
  require 'wirble'
  Wirble.init
  Wirble.colorize
rescue 
  puts "Couldn't load Wirble, continuing anyway"
end

回答1:


Put gem 'wirble', :group => :development in your Gemfile.

PS Take a look on Hirb and awesome_print also.



来源:https://stackoverflow.com/questions/9406245/rails-console-with-wirble

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!