Failed to allocate memory (No MemoryError) in Ruby?
问题 I wrote a simple script that is supposed to read an entire directory and then parse the HTML data into normal script by getting rid off the HTML tags and then write it into one file. I have 8GB memory and also plenty of available virtual memory. When I am doing this I have more than 5GB RAM available. The largest file in the directory is 3.8 GB. The script is file_count = 1 File.open("allscraped.txt", 'w') do |out1| for file_name in Dir["allParts/*.dat"] do puts "#{file_name}#:#{file_count}"