Charles G

Joined

30 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Pair Programming on Rails Scopes Discussion

Maybe I'm doing something else wrong?

2.7.0 :001 > require "active_support/all"
=> true
2.7.0 :002 > Event.current_month
Traceback (most recent call last):
4: from /Users/charles/.rvm/rubies/ruby-2.7.0/bin/irb:23:in <main>'
3: from /Users/charles/.rvm/rubies/ruby-2.7.0/bin/irb:23:in
load'
2: from /Users/charles/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `'
1: from (irb):2
NameError (uninitialized constant Event)
2.7.0 :003 >

Posted in Pair Programming on Rails Scopes Discussion

Ok got it, thanks for the really quick response Chris.

Posted in Pair Programming on Rails Scopes Discussion

When I try to follow and enter these commands into irb, I keep getting the following errors. Any idea what I am doing wrong?

2.7.0 :002 > Time.zone.now
Traceback (most recent call last):
5: from /Users/charles/.rvm/rubies/ruby-2.7.0/bin/irb:23:in <main>'
4: from /Users/charles/.rvm/rubies/ruby-2.7.0/bin/irb:23:in
load'
3: from /Users/charles/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in <top (required)>'
2: from (irb):1
1: from (irb):2:in
rescue in irb_binding'
NoMethodError (undefined method `zone' for Time:Class)

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.