After setting up a handful of Windows 8 laptops it dawned on me that the much debated operating system still refuses to set your timezone based on your region selection.
You'd think by now that when you tell Windows you are in the UK and would like a UK keyboard layout, it might be able to then set the timezone to London/GMT/BST. Nope. Still defaults to the US West Coast.
Interesing piece on The Pug Automatic about creative uses for the Rails `flash` function. Although the implementations differ, the Ramaze version of `flash` will enable you to do much the same things.
A good reminder in the comments, as well, about not caching any views where you are likely to be using this, as people will either end up with other people's flashes, or stuck with the same flash for X minutes/hours.
Ramaze is documented to work on Heroku without too much issue, and I wanted to see if you can easily deploy a Ramaze based web application to the new PaaS kid on the block, AppFog.
AppFog is documented to support Sinatra and Rails, so it was never going to take much to get another Rack based framework (as Ramaze is) up and running. The only real consideration is the Gemfile, which perhaps we are not so used to using in Ramaze land, because bundler is not avidly advocated here as it might be for Rails or Sinatra.
Deploying a vanilla Ramaze app to AppFog
Before you can do anything on AppFog, you need an account - so go and signup if haven’t done so yet. You will also need to Ruby-powered command line utilities to provision and deploy your apps:
Now we are done with that, the next step is to create a new Ramaze app:
Now we need to create a valid Gemfile in the root of the new application, the file should contain:
Now the relevant gems need to be packaged up for the af AppFog command line tool:
Now we can deploy this puppy! It really can be as simple as:
Make sure you are in the root directory of the app for this, as the af utility is able to determine a few things about the type of app you are deploying. You will need to either accept the defaults or give some sensible answers to the following guided wizard:
Most significantly, you will have to change your app name (if you are deploying on the same infrastructure zone). Other than that I went with defaults, apart from writing out the manifest.yml configuration information to file for future use.
And then you are done - you can see the fruits of this labour over here: http://ramaze-appfog.eu01.aws.af.cm/ - remember that, as with Heroku, there is no persistent file storage (at the moment), so any app/user generated files need to be stored elsewhere, or in a database on AppFog.
Now you can knock yourself out with the deployment tool docs: here. Enjoy!
Following some discussion on the Ramaze group (Google Groups), I am thrilled to see the Ramaze Wiki is being rekindled under the Github Wiki banner.
The old Ramaze wiki had some great content in, stuff that never quite found a place in the official docs. There has already been a surge of contributions to the new one, and I am hoping to add a few pages over the next week or so (specifically unicorn deployments, and integrating rack cache on your actions).