Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:11:04+00:00 2026-06-18T00:11:04+00:00

I have a client that uses SQL Server Reporting Services to generate reports and

  • 0

I have a client that uses SQL Server Reporting Services to generate reports and exports them in MHTML. The Client wants to just push the MHTML in a pre-defined directory structure to my Rails public/reports folder.

Is there any way in Rails to “Take in” the directory structure, create a list of files recursively, generate an unordered list and then create routes dynamically for each MHTML file? I know MHTML files can be embedded with Iframes (although with limited browser support, this is not an issue for me)

The predefined Directory structure is Public/Reports/Dashboard/Exceptions/

Dashboard will contain 1 MHTML file and exceptions (which will be a sort of subnav or child of Dashboard) will contain an undefined amount.

The layout template will be a sort of wrapper.

Anyone who has experience with Rails know the best way of achieving the desired result?

Any help will be sincerely appreciated. I am using Rails 3.0.20 (which doesn’t have the Asset pipeline), this will won’t be hosted on Heroku (I am aware of no-write permissions)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:11:05+00:00Added an answer on June 18, 2026 at 12:11 am

    (Sorry, I’m not super familiar with MHTML files, so I’m going to assume these are just static files that a browser can interpret.)

    There is nothing in particular in Rails that provides the behavior that you’re referring to. Rails is just a framework to help serve dynamic responses, and the functionality you want is in relation to the filesystem, which Rails mostly abstracts away.

    There’s a couple options I can think of.

    1. Roll your own

      Ruby has file and directory utilities which you could use to read in the contents of a directory in public and render the kind of response you’d like. I would start here:

      http://www.ruby-doc.org/core-1.9.3/Dir.html

      And play around with ruby’s directory globbing to get a file listing.

    2. Use Rack

      Rails is built ontop of Rack, a standard webserver interface that most ruby application server implement now. Rack provides some libraries that make serving static assets like a traditional web server a little easier.

      Here’s a couple of resources to check out:

      http://quickleft.com/blog/rack-130-serving-static-files
      http://edgeguides.rubyonrails.org/rails_on_rack.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a have Winforms client that uses Web services on a IIS7 (W2008)
I have a client and a server app on Android (that uses ZeroC -
So I have an app that uses the Zend amazon web services client. I
I have a SQL Server 2008 database table that uses uniqueidentifier as a primary
I have a client application that connects to a server. The server uses hibernate
I have a application that uses LocalDataCache to synchronise a SQL Server 2008 Express
I have a client/server application that depends on MS SQL database for backend storage,
Our application is a Windows client (C++/MFC migrating to C#) that uses SQL Server
We have a system that uses a SQL server 2005 database with a number
So, I have an app that uses a SQL Server express db. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.