Top "Nomethoderror" questions

A Ruby exception that is raised when a method is called on an object which doesn't respond to that method.

undefined method (NoMethodError) ruby

I keep getting the following error message: text.rb:2:in `<main>': undefined method `choices' for main:Object (…

ruby nomethoderror
Ruby - NoMethodError (undefined method for nil:NilClass):

I'm having some difficulty trying to figure out what I am doing wrong. My ActiveRecord query is returning nil which …

ruby-on-rails exception null nomethoderror
Ruby: NoMethodError, but why?

I was working on a simple Pi Generator while learning Ruby, but I kept getting NoMethodError on RubyMine 6.3.3, so I …

ruby nomethoderror
Rails 3.2 undefined method `key?' for nil:NilClass

For some reason I started to get this error after switching to Rails 3.2. I guess it has something to do …

ruby-on-rails plugins ruby-on-rails-3.2 nomethoderror
Rails - NoMethodError undefined method

I am working on building an application (following Michael Hartl's chapter 11) where users can follow projects that are created by …

ruby-on-rails nomethoderror
Ruby - Module :: NoMethodError

I have a module like this: module Prober def probe_invoke(type, data = {}) p = Probe.new({:probe_type => type.…

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

Here is my code: class Order < Grape::Entity expose :id { |order, options| order.id.obfuscate } expose :time_left_to_…

ruby-on-rails ruby if-statement nomethoderror grape-api
NoMethodError - undefined method 'find_by' for []:ActiveRecord::Relation

I've been following Michael Heartl tutorial to create a follow system but I have a strange error: "undefined method `find_…

ruby-on-rails devise rails-activerecord nomethoderror
rails < 4.0 "try" method throwing NoMethodError?

Why is try throwing an error? Doesnt that defeat the whole purpose? Maybe its just in the console? ruby-1.9.2-p180 :101 &…

ruby-on-rails rails-activerecord nomethoderror
NoMethodError in Users#index 'undefined method `each' for nil:NilClass'

I'm getting a NoMethodError in Users#Index with an 'undefined method `each' for nil:NilClass' for the line below: <% @…

ruby-on-rails ruby-on-rails-4 undefined nomethoderror