I ran in development mode, I don't see any error in develop.log when I get "
Incomplete response received from application" message,
URL for the path is:
http://localhost/smart/samplesize/computeeven in function compute, I directed it to "results", I only have
views for index, progress and results. It was not a problem in previous
versions when I set up in Mavericks.
class SamplesizeController < ApplicationController
require 'fiddle/import'
module Libm
extend Fiddle::Importer
dlload '/Library/WebServer/smart/lib/libsamplesize.dylib'
extern 'long Calculate(long, double, double, char*)'
end
def index
reset_session
end
def progress
# session[:sigma_sq] = params[:sigma_sq].to_f
session[:delta] = params[:delta].to_f
session[:conf] = params[:conf].to_f
session[:nmax] = params[:nmax].to_i
redirect_to :action => "compute"
end
def compute
if ( session[:delta] < 0.0 ) || ( session[:delta] > 1.0 )
session[:errmsg] = "The value of delta must be between 0 and 1."
session[:n] = -1
elsif ( session[:conf] < 0.0 ) || ( session[:conf] > 1.0 )
session[:errmsg] = "The value of conf must be between 0 and 1."
session[:n] = -1
elsif ( session[:nmax] < 0.0 )
session[:errmsg] = "The value of nmax must be positive."
session[:n] = -1
else
session[:errmsg] = " "
session[:n] = Libm.Calculate( session[:nmax], session[:delta],
session[:conf], session[:errmsg])
end
redirect_to :action => "results"
end
def results
# @sigma_sq = session[:sigma_sq]
@delta = session[:delta]
@conf = session[:conf]
@nmax = session[:nmax]
@n = session[:n]
@errmsg = session[:errmsg]
end
def start_over
reset_session
redirect_to :action => "index"
end
end