Closed skri2015 closed 9 years ago
I was getting this error too, on a brand new installation of Redmine (with the timesheets plugin).
I solved it by:
if RUBY_VERSION < '1.9'
require 'faster_csv'
else
require 'csv'
FCSV = CSV
end
Make sure you restart your web server after making this change.
Works. Perfectly. Thanks.
Works. Perfectly. Thanks.
I don't get the 500 error any longer, but the CSV file is not blank, except for the data headers.
works perfect with 3.3 thanks!
Don't work. For small data size I got error in pruduction.log: Completed 500 Internal Server Error in 185ms (ActiveRecord: 60.5ms)
NoMethodError (undefined method tracker' for nil:NilClass): plugins/redmine_timesheet_plugin/app/models/timesheet.rb:234:in
time_entry_to_csv'
plugins/redmine_timesheet_plugin/app/models/timesheet.rb:173:in block (3 levels) in to_csv' plugins/redmine_timesheet_plugin/app/models/timesheet.rb:172:in
block (2 levels) in to_csv'
plugins/redmine_timesheet_plugin/app/models/timesheet.rb:171:in each' plugins/redmine_timesheet_plugin/app/models/timesheet.rb:171:in
block in to_csv'
plugins/redmine_timesheet_plugin/app/models/timesheet.rb:165:in to_csv' plugins/redmine_timesheet_plugin/app/controllers/timesheet_controller.rb:87:in
block (2 levels) in report'
plugins/redmine_timesheet_plugin/app/controllers/timesheet_controller.rb:85:in report' lib/redmine/sudo_mode.rb:63:in
sudo_mode'
For big data size error in browser: Request-URI Too Long
The requested URL's length exceeds the capacity limit for this server.
Additionally, a 414 Request-URI Too Long error was encountered while trying to use an ErrorDocument to handle the request.
I think it was fixed in #63, but not commited to master…
redmine_timesheet_plugin-csv.diff.gz
Problem still occurs. Applying patch by hand is only way :(
@Vitexus Thank you very much for extracting the patch! I tested it (works!), and created a PR: #77
Open file plugins/redmine_timesheet_plugin/app/models/timesheet.rb line 167:
FCSV.generate(out, :encoding => 'utf-8', :force_quotes => true) do |csv|
Change FCSV To CSV
Hi there, running Debian 7, Redmine 3.0.1 and latest version of Timesheet Plugin (Fresh Git clone), I constantly experience "NameError (uninitialized constant Timesheet::FCSV")" and an "Internal error page" when clicking on CSV Export. I already downloaded Timesheet Plugin several times and re-installed it three times. Always with complete shutdown/reboot procedure. Bundle install says system is up2date. What can I do? Where to inform Ruby that the constant has to be initialized? Thank you for the support.