Skip to content

Instantly share code, notes, and snippets.

SystemStackError in SchedulesController#edit
stack level too deep
RAILS_ROOT: /Users/light/work/oss/redmine
Application Trace | Framework Trace | Full Trace
/Users/light/.rvm/gems/ruby-1.8.7-p249+onu/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:241:in `method_missing'
/Users/light/.rvm/gems/ruby-1.8.7-p249+onu/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:249:in `method_missing'
/Users/light/.rvm/gems/ruby-1.8.7-p249+onu/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `send'
/Users/light/.rvm/gems/ruby-1.8.7-p249+onu/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `method_missing'
SystemStackError in Schedules#my_index
Showing vendor/plugins/redmine_schedules/app/views/schedules/_schedule_entry.html.erb where line #2 raised:
stack level too deep
Extracted source (around line #2):
1: <li class="schedule_entry" style="min-height: <%= 2.7*entry.hours %>em">
2: <div title="<%= ScheduleCompatibility::I18n.lwr(:label_f_hour, :value => entry.hours) %>" style="min-height: <%= 2.7*entry.hours - 1.7 %>em; <%= entry.style(@user.nil? ? entry.user.id : entry.project.id) %>">
3: <%= link_to entry.project, :controller => 'schedules', :action => 'index', :date => entry.date, :project_id => entry.project if @project.nil?%>
rvm ruby-1.8.6-tv1_8_6_287+ygs
require 'test/test_helper'
class FormController < ActionController::Base
def blech
render :text => <<-HTML
<html>
<head></head>
<body>
<form id="the_form" action="/barblech" method="POST">
<input type="hidden" id="the_answer" value="42"></input>
➜ ~ rvm install 1.8.7
info: Installing Ruby from source to: /Users/light/.rvm/rubies/ruby-1.8.7-p174
info: /Users/light/.rvm/src/ruby-1.8.7-p174 has already been extracted.
info: Configuring ruby-1.8.7-p174, this may take a while depending on your cpu(s)...
info: Compiling ruby-1.8.7-p174, this may take a while, depending on your cpu(s)...
for(rowNum = 0; projectNum < [tracker.projects count]; rowNum++) {
for(NSUInteger colNum = 0; colNum < numCols; colNum++) {
NSLog(@"projectNum: %d", projectNum);
if (projectNum >= [tracker.projects count]) {
break;
}
project = [tracker.projects objectAtIndex:projectNum];
NSLog(@"Got project %@", project.name);
x = (colNum+1) * PROJECT_COL_MARGIN + colNum * PROJECT_CARD_WIDTH;
// Exercise 2 - Closures
// Wrap the following code in a closure and export only the "countdown" function.
// Code
(function(scope) {
var index;
function log(){
console.log(index);
}
var index;
function log(){
console.log(index);
}
function iterate(){
log();
if(index>1) setTimeout(iterate, 1000);
index--;
// 1. Write a class to support the following code:
var Person = function(name) {
this.name = name;
}
Person.prototype.getName = function() {
return this.name;
}
- (NSString*) tableView:(UITableView*) titleForHeaderInSection:(NSInteger)section {
...
}