Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Usage  >  Troubleshooting  >  Thread
   
 
NoMethodError in Recurring_todos#index
 
Hooman
Posted: 05 June 2009 04:29 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  5
Joined  2009-06-05

I just upgrade my Tracks from 1.6 to 1.7.

It looks like every thing is OK except the new fuction “recurring_todos”.  Below is the detail error info I got when click the “Recurring_todos” icon. And I’m wondering how to resolve it.

NoMethodError in Recurring_todos#index

Showing app/views/recurring_todos/_recurring_todo_form.erb where line #76 raised:

undefined method `today’ for Time:Class

Extracted source (around line #76):

73:    <div id=“recurring_timespan”>
74:      <br>
75:      <label for=“recurring_todo[start_from]”>Starts on </label><%=
76:      text_field(:recurring_todo, :start_from, “value” => format_date(Time.today), “size” => 12, “class” => “Date”, “onfocus” => “Calendar.setup”, “tabindex” => 6, “autocomplete” => “off”) %><br>
77:      <br>
78:      <label for=“recurring_todo[ends_on]”>Ends on:</label><br>
79:      <%= radio_button_tag(‘recurring_todo[ends_on]’, ‘no_end_date’, true)%> No end date<br>

My Tracks is installed on my laptop running with Windows XP, and I’m using
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mongrel_service (0.3.4)

Profile
 
Hooman
Posted: 06 June 2009 04:17 AM   [ Ignore ]   [ # 1 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-06-05

I think this problem is similar to this one
http://www.getontracks.org/forums/viewthread/381/

My rubygems version is:
rubygems-update (1.3.4)

So, can I “replace the usage of Time.today (was only used at the recurring todos) with regular Time function” by myself. I really don’t know how to.

Profile
 
Reinier Balt
Posted: 08 June 2009 07:29 AM   [ Ignore ]   [ # 2 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

This is fixed in the upcoming 1.7.1.

Awaiting the release, you could
1) manually change the files
2) install the 1.7.1devel version from github that has several fixes including the Time.today stuff.

Profile
 
Hooman
Posted: 15 June 2009 03:29 AM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-06-05

Thank you very much Reinier.

It maybe easier to me to manually change the files when waiting the release. But I guess it still takes time to find out how to do it, since I know little about Ruby/ROR.

For github, I know nothing raspberry

Profile
 
Reinier Balt
Posted: 18 June 2009 09:04 AM   [ Ignore ]   [ # 4 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

on github you can donwload the latest dev tree as a zip and just install it like a final release, see the download button on http://github.com/bsag/tracks/tree/1.7_branch

Profile
 
Hooman
Posted: 06 August 2009 03:39 PM   [ Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-06-05

Opps. It’s not easy to me to install a git version.

I download the zip file today, and try upgrading….When I run

rake db:migrate RAILS_ENV=production 

I got some errors…
The first error is

tracks>rake db:migrate RAILS_ENV=production

rake aborted
!
no such file to load -- spec/rake/spectask 

I resolved it by install rspec.

The second error is

tracks>rake db:migrate RAILS_ENV=production
(in C:/Tools/tracks)
rake aborted!
RubyGem version error: actionpack(2.3.2 not = 1.13.6) 

I can’t resolve it, coz the gem install can’t find a 1.13.6 version actionpack.
And also, the mongrel can’t startup. I have to roll back to 1.7

Profile
 
Hooman
Posted: 06 August 2009 03:58 PM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  5
Joined  2009-06-05

I changed the file app\views\recurring_todos\_recurring_todo_form.erb
line 76 from

text_field(:recurring_todo, :start_from, "value" => format_date(Time.today), "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %><br/> 

to

text_field(:recurring_todo, :start_from, "value" => format_date(user_time), "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 6, "autocomplete" => "off") %><br/> 

It seems working….
Hope this is the only place need to be changed.

Profile
 
Reinier Balt
Posted: 07 August 2009 07:07 AM   [ Ignore ]   [ # 7 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

yes, I think that is the only one.

Profile
 
   
 
 
‹‹ Errors as admin on /users view in Windows based Browsers      Stats doesn’t work, everything else does ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1182 seconds

Atom Feed
RSS 2.0