Ruby – Module :: NoMethodError

Apart from the answers that give you the option of defining the function as self., you have another option of including the module and calling it without the module reference like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.to_s, :data => data.to_json, :probe_status => 0, :retries => 0}) p.save end … Read more

What is the difference between `try` and `&.` (safe navigation operator) in Ruby

&. works like #try!, not #try. And here is description of #try! (from documentation): Same as #try, but will raise a NoMethodError exception if the receiving is not nil and does not implemented the tried method. So basically it saves you from calling a method on nil, but if an object is presented it will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)