TTT TTT - 1 year ago 125
CoffeeScript Question

Export static HTML+CSS+JS from Rails

When creating static apps I often start a new Rails app. This makes quite some things easier, like compilation (Coffeescript, SCSS), minimization (JS, CSS) and browser limitations (the page is being served from localhost:3000 so external sources can be loaded etc.).

At the end I want to export the app so I can put it online. Then I just need the HTML+CSS+JS. One can go and pluck the files out manually, but there probably is an easier way for this.

So: is there a tool that stores the compiled, minimized HTML+CSS+JS files from a Rails app?

Answer Source

If you just want to basically copy the website as it will be rendered by rails (and there is no need for server side code execution), you could just mirror the rails-website using

wget --page-requisites --convert-links http://URL-to-Start

However, this will only download those files that are referenced from the entry URL, so you might need to run it on all sub-URLs individually.

Source: Download a working local copy of a webpage

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download