-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange conflict with -rails- irb seemingly #8
Comments
So it seems that there is a problem not with rails, but with irb to reproduce
does anybody else have this problem with their files? same problem with pry. eats up gigabytes of memory and grows and grows |
OKAY, so my real problem is that Workbook cannot be nicely printed...
works fine, but then
again waits forever... |
the culprit seems to be that workbook#inspect loops over all its instance variables, and so does worksheet.... does worksheet keep a reference back to workbook somewhere? |
How was the file "my_file.xls" created? Did you create that file with MS Office, LibreOffice or with spreadsheet? |
I have the same problem with memory in irb under Ruby 1.9.3. No problem under 1.8.7 |
interesting. |
Ditto. Same problem under irb, ruby 1.9.3 (installed from RVM if that matters). |
BiggerNoise: What is your sample code? What are you trying to do? |
Sample is:
If I try and run this under irb, it will exhaust the memory on my machine (starting from ~8GiB). However, if I just put this in a script, it will run fine. I am able to see the worksheets and get row and column counts. As far as what I am trying to accomplish, my ultimate goal is to take the spreadsheet that this analysis program produces and import it into my rails application. I may need to jump through some hoops to make that happen in a reasonably performant way, but the first step will be reading the spreadsheet. Let me know if that answers your questions. |
Yes, it does answer my question. I do not know why irb is exhausting your memory. Are you on Linux or Windows or Mac? |
I am running Mac (10.7). And, if it helps:
I did follow the advice that I found elsewhere and shutdown irb's inspection of the workbook:
That allows me to work in irb. |
Awesome! Can you post analysis.summary.xls somewhere please and link it here. |
I am trying to make a spreadsheet where I can reproduce the problem. Unfortunately, I can't post the one that is actually giving me grief. I will see what I can do and get back to you. |
Calling Spreadsheet.open works fine in a simple ruby script, but blows up my machine and (seemingly) never finishes when i try to use it in my rails app. Also blows up in a newly minted rails app that just has gem 'spreadsheet' added
Any guesses as to what might cause this? Core extensions maybe? Is there anything I can do to help debug this problem?
Thinking to just create a separate service to handle xls files, but would be easier to integrate it and access all my existing models and helpers, etc...
The text was updated successfully, but these errors were encountered: