 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Hannes Wyss
RE: Spreadsheet not working in production environ [ reply ] 2010-06-01 12:35
|
Unfortunately I have little experience with Rails, and where I used Spreadsheet with Rails I never came across this problem.
Since this happens on the same physical machine, I would concentrate my search on the obvious difference of the rails environment, and look for changes in behavior that might entail.
Things I would check:
* are the uploaded files truly the same? (e.g. permissions, file content, safe-level, etc.)
* is this some sort of buffering or redirecting problem? (what is your stdout/where should you see the results of puts)
* do you need to rewind the IO for some reason? (complete shot in the dark)
* does your production-environment require an old version of spreadsheet?
hope that helps,
cheers
h.
|
By: Pikender Sharma
RE: Spreadsheet not working in production environ [ reply ] 2010-06-01 12:15
|
Environment:
Ruby: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
Gem Package Manager: 1.3.6
Rails: 2.3.5
Script:
require "spreadsheet"
## Please not same xls uploaded in both environments
## Server ran on same PC side by side
## OS : Windows Vista Home Basic
def upload
wb = Spreadsheet.open file_path
## file_path=Rails_Root + public/uploads/file_name.xls
ws = wb.worksheet 0
header_col = ws.row(3)
puts header_col.at(0)
## In Dev value is "Level" == In Prod Value is "" :: Nothing comes
puts header_col.at(1)
## In Dev value is "Dept" == In Prod Value is "" :: Nothing comes
puts header_col.at(2)
## In Dev value is "Location" == In Prod Value is "" :: Nothing comes
end
Please let me know if any more info. required.
I will be happy to give any info required as I want to resolve it ASAP.
Thanks in advance :)
|
|
 |