Garvindocs is a project mainly written in RUBY and JAVASCRIPT, it's free.
My own implementation of a google docs like editor in ruby on rails
==GarvinDocs GarvinDocs is my own personal version of the Google Docs editor written in Ruby on Rails. Current Features: Keyboard Shortcuts for most actions. Ability to print by downloading a PDF. Interact with files like you are using a File Manager. IE folders not tags unlike Google Docs
==Tools htmldoc is used to generate PDFs
==Upcoming Features I plan to implement importing common Office File types. Revision History Sharing Folders and Documents And any other ideas I or someone else provides.