I just created my first Rails 6 project ruby 2.7.0 rails 6.0.3
.
I have the following file:
#app\models\foo.rb
class Foo
def initialize
end
def bar
puts("Whoohoo!")
end
end
From rails console
I am trying to run:
foo = Foo.new
And I keep getting the error:
Zeitwerk::NameError (expected file <mypath>/app/models/foo.rb to define constant Foo, but didn't)
Coming from Rails 5 I'm lost as to what I'm doing wrong.