Internet File Manager - Rails 3 RC2
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Internet File Manager

Updates 08/29/2010

So this is the latest and greatest upgrade of the Internet File manager in Rails 3 release candidate 2. All the tests pass and work including cucumber. A number of deprecation warnings remain which I am too tired to remove at this point (some day). You may want to download the file_manager238 app which works with Rails 2.3.8 to compare and use it as a basis for upgrading your apps.

Please note that a few of the cucumber features will fail since they need amazon aws keys to operate correctly. Please substitute appropriate key values and they should work fine. The shoulda tests, both units and functionals work fine.

This is a Rails 2.3.8 application used to manage files over the web in a distributed environment. It has been extracted from an application that is in production, so it works in real-life. My motivation in releasing it is to share knowledge and put something back in the Rails community.

Briefly, it lets you organize files in a hierarchy of “Clients -> Folders -> Documents.” The folders can be nested within folders to an arbitrary depth. It comes with four pre-defined roles for users. Each role can have multiple users.

  1. admin - has full access to everything in the application.

  2. leader - can access everything except the administrative sections.

  3. staff - can only access clients/folders for which they have been assigned permissions by the admin

  4. eclient - or External Client - the aforementioned first three roles, i.e., admin, leader, and staff

are considered internal and can access any Clients' account and folders with the caveat that staff users may have restricted permisssions. External client users, on the other hand, can only access their own client accounts (the admin sets up the accounts). There can be multiple user accounts assigned to the same external client.


  • Git clone the project using the URL from github.

  • config/environment.rb has a list of gems used in the project. If I have missed anything, let me know.

  • There are several plugins used that can be moved to gems. I will do that most likely for the Rails 3 upgrade.

  • The application is setup to use MySQL and has been developed on Ubuntu, though, it has been sparsely tested in Windows.

  • Create MySQL database: I called it file_manager_dev (pick any name and update database.yml accordingly).

  • Run rake db:migrate from Rails root - creates the database schema

  • Run rake db:seed from Rails root - creates seed data in reference tables

  • Run rake db:populate from Rails root - populates the clients and folders tables with example data

Note that the above three commands can be packaged as one rake task, e.g., setup, and I tried (see lib/tasks/application.rake), but for some reason it does not work. May be someone with better knowledge of Rake can point out?

  • Thinking Sphinx setup - I had diabled it for the move to Heroku. I will reenable it but only for Rails 3.

  • To run the Shoulda tests - type rake test from Rails root.

  • to run the Cucumber tests - type cucumber features from Rails root.

The application bootstraps the seed data,e.g., roles, minimum number of users, and a few lookup tables. Feel free to customize them except the roles that are hard-wired in the application at the moment. I am thinking of using Ryan Bates's cancan to centralize authorization logic, but haven't done it yet.

Gems and Plugins

The application uses several useful tools that can be used as a learning example:



  • Vim Excellent screen-casts at peepCode.

  • Books - too many to mention here :)

Demo App (Please note that the demo app still uses Rails 2.3.5, so try it only for testing purposes)

I have deployed a demo app on Heroku at the following URL: login with the following userid/password combination for various roles: Admin Role - system/important Lead Role - leader/leader Staff Role - staff/staff

See the db/seeds.rb file if you need more explanation

Note for the demo app - since I did not want to deal with the SSL issues on Heroku free account, I have commented out the ssl related code in the following files:

application_controller.rb user_sessions_controller.rb users_controller.rb


The application has been extensively tested in Firefox only. Your milage will vary with other browsers, especially Internet Explorer!


Released under the MIT license. Not responsible for errors. Use at your own risk.

Contact Info

Bharat Ruparel