3 ms·
In case you want to take the Rails plunge, my Ruby on Rails Tutorial book is available online at http://www.railstutorial.org/book http://www.railstutorial.org/
by mhartl 17y ago
In case you want to take the Rails plunge, my Ruby on Rails Tutorial book is available online at http://www.railstutorial.org/book http://www.railstutorial.org/book, and it uses Heroku starting in Chapter 1 (i.e., http://www.railstutorial.org/book#sec:deploying http://www.railstutorial.org/book#sec:deploying). Three years ago (when my first Rails book came out), covering deployment in the first chapter would have been unthinkable, but with Heroku the unthinkable becomes
$ git init && git add . && git commit -m "init"
$ heroku create
$ git push heroku master
Subsequent deploys go like this:
$ git commit -am "Changed some stuff"
$ git push heroku
(The book is currently in progress, but I've written 11 of 12 chapters, so it's likely to be done before you would have time to reach Chapter 12. Also, the current book uses Rails 2.3.5, but a Rails 3 version is also in the works.)
- mhartl 17y agoBy the way, the Rails Tutorial site itself is also hosted on Heroku. By setting the appropriate header, I've arranged for Heroku to cache the site's static pages, which on subsequent requests get served with blazing speed (see, e.g., http://docs.heroku.com/http-caching http://docs.heroku.com/http-caching). (Because of its read-only file system, Heroku doesn't support Rails page caching, but that's OK: their Varnish cache (http://varnish-cache.org/ http://varnish-cache.org/) is even faster. :-) Thus, though designed principally for dynamic applications, Heroku is also great for static content.