time_splitter gem getting uninitialized constant S

2019-08-05 09:08发布

问题:

I have installed the time_splitter gem so that I can use a single date_time field. My bundle includes version 1.0.0. As recommended here, I added this code to my class Sheet:

extend TimeSplitter::Accessors
split_accessor :event_time

I am getting an error on the extend:

NameError in SheetsController#new
uninitialized constant Sheet::TimeSplitter

I'm about to give up and hack together a date/time solution but was hoping for something more elegant. Thanks in advance for your help.

回答1:

You need to restart your server. Happened to me :)