Ruby, no implicit conversion of Symbol into Integer

前端 未结 1 1649
渐次进展
渐次进展 2021-01-28 05:11

yesterday I already asked you in \"no implicit conversion of Symbol into Integer, Ruby\". I think you need further information to answer the question. That’s the reason, why I a

1条回答
  •  醉梦人生
    2021-01-28 05:20

    You create RubyCommandinstance like

    Litu::RubyCommand.new("switch_wago_do")
    

    and you have

    def initialize(params, &block)
    

    So params would be String equal "switch_wago_do".
    But you expect it to be Hash instance.

    That is why commenting these strings solves problem.

    @killProc=params[:killProc]
    @name=params[:name]
    @working_directory=params[:working_directory]||"."
    

    0 讨论(0)
提交回复
热议问题