Topic: Advice needed: uploading/download, loading text to textarea.

I'm working on a project that is something like an online IDE.  On the left-hand side there will be a file list.  To the right there will be a textarea.

A user will select a file (.css, .html, .cpp, .java, etc...), click "open", and then the text in this file should load to the text area.

Is there a common solution to something like this?

Also, how should I go about uploading/downloading files, creating files, etc.  For uploading files I have been looking at the paperclip gem.  Is there another gem that would work for this?

Thanks in advance.

Re: Advice needed: uploading/download, loading text to textarea.

I think the base is to use Ruby IO library to read from a file:

File.open("testfile") do |file|
  while line = file.gets
    puts line
  end
end

The rest is just to implement event handler (get the file name and its path, click on the button) and display it in a view.