# Getting undefined method time\_select

**URL:** <https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757>\
**Category:** Rails\
**Created:** [March 22, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757 "2007-03-22T15:27:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/1 "2007-03-22T15:27:39Z")

</div>

Is this a rails version issue? Any suggestions for alternative?

ActionView::TemplateError (undefined method `time\_select’ for  
#\<#Class:0xb790c54c:0xb790c524\>) on line #14 of app/views/admin/  
\_taskform.rhtml:  
11:

  
12: 

13: Start:  
14: \<%= time\_select(‘task’, ‘start\_at’) %\>  
15:

  
16: 

17: End:

Thanks.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/2 "2007-03-22T16:28:50Z")

</div>

Hi Stephen,

removed\_email\_address@domain.invalid wrote:

> ActionView::TemplateError (undefined method `time\_select’ for  
> 14: \<%= time\_select(‘task’, ‘start\_at’) %\>

How is the start\_at field in your tasks table defined?

Bill

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/3 "2007-03-22T16:45:52Z")

</div>

Hi Bill -

```
create_table :tasks do |t|
  t.column "room_id", :integer
  t.column "work_on", :date
  t.column "start_at", :time
  t.column "end_at", :time
  t.column "desc", :string
  t.column "needed", :integer

```

This works on my local machine, when I move it out to RailsPlayground  
I am getting this error.

-Stehen.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/4 "2007-03-22T17:45:03Z")

</div>

Thank you Bill.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 6:55pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/5 "2007-03-22T18:55:38Z")

</div>

On Mar 22, 2007, at 11:43 AM, removed\_email\_address@domain.invalid wrote:

> This works on my local machine, when I move it out to RailsPlayground
> 
> > > 14: \<%= time\_select(‘task’, ‘start\_at’) %\>
> > 
> > How is the start\_at field in your tasks table defined?
> > 
> > Bill

Just a caution about a column named “desc”. Since that matches an  
SQL keyword (as in “select \* from tasks order by start\_at DESC”), you  
may run into trouble later if there’s ever a time where the column  
name isn’t properly quoted.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 22, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-time-select/89757/6 "2007-03-22T17:36:02Z")

</div>

Hi Stephen,

removed\_email\_address@domain.invalid wrote:

> ```
> t.column "start_at", :time
> 
> ```

> This works on my local machine, when I move it  
> out to RailsPlayground I am getting this error.

I’d recommend you put together a very, very minimal sandbox app and try  
that  
on RailsPlayground. By minimal I mean, for example, take out everything  
in  
the table except start\_at. Have one controller with two methods, one to  
display the view for entry of the date, and one to save the result to  
the  
database. Have two views, one that allows the entry of that field, if  
that’s what your app allows and the other that displays the value that  
got  
saved or an appropriate error message. If the problem is still  
demonstrable, then document the config of your local machine including  
gem  
list, plugins, versions of everything, and submit a ticket to your  
support  
team. In my experience, you definitely need to have something the  
support  
team can work with to get them engaged.

Best of luck,  
Bill
