The permission is on 'text/.' which is 'text' itself.

Try:

> campershash = Hash.new
> Dir.entries("text").each do |textfilename|

Probably better expressed as Dir.glob('text/*') or Dir['text/*']. This
also ignores the "." and ".." files.

>    campershash["#{textfilename.chop.chop.chop.chop}"] = 

Try textfilename[0..-5] for a fixed size slice.

>      File.open("text/" + "#{textfilename}") { |f| f.gets(nil) } 

	 File.open(textfilename) if you've used glob, which preserves
the path info.

To concatenate strings use: 
	"text/" + textfilename.to_s
Or better yet:
	"text/#{textfilename}"

> end