Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: P K
RE: Spreadsheet not working in production environ [ reply ]  
2010-06-01 13:03
Check your file path. The uploaded file is avaible from tmp directory if is send from browser.
Example:
filename = params[:Filename]

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 :)

By: Hannes Wyss
RE: Spreadsheet not working in production environ [ reply ]  
2010-05-31 17:19
Pikeder, please post your error message, backtrace, and a minimal script that reproduces the error. If I have nothing to work from, chances are I won't be able to help you :)

h.

By: Pikender Sharma
Spreadsheet not working in production environ [ reply ]  
2010-05-31 05:27
I am using spreadsheet gem to read excel files.
In dev environment, spreadsheet gem is able to read excel files but when I move to production environment, spreadsheet gem is unable to read contents of excel file.

Please help!!