I’ve just released my first ever RubyGem. It’s a simple gem named Manifesto that dynamically generates an HTML 5 cache manifest for offline application caching. I got the idea whilst developing my Truth Tables Sinatra micro web application. It returns a list of files within the specified directory and sub-directories.
On Sunday I returned from two days in Edinburgh for the inaugural Scottish Ruby Conference. The event has broadened its focus and rebranded from its previous Rails remit when it was Scotland on Rails. The venue this year was the splendid Royal College of Physicians, an imposing building with an ornate interior.
The Sitemap protocol was introduced by Google in 2005, but is now supported by all of the major search engines. Unrelated to a traditional website sitemap navigation page, it defines an XML schema for listing the URLs within a site, including metadata such as when a URL as last updated, therefore allowing search engines to crawl the site more intelligently.
One of the trends we've seen on the Web this year has been the proliferation of URL shortening services, to the extent that TinyURL is no longer the default choice. This growth has been driven by the popularity of Twitter with its enforced 140 character message limit and by seamless integration with mobile device Twitter clients such as Tweetie. However, questions over the longevity of these services and the permanence of the links they serve has also led to a new trend of hosting your own. As it seems to be all the rage I thought it would be a fun little exercise to write one for this blog using Sinatra.
Now that my new blog is live I needed a way to take daily back-ups of the MySQL database to a remote server for safekeeping. Writing a custom Rake task is perfect for this purpose.
This is a post that I've been waiting to write for a long time. I have spent what at times has seemed like forever developing a new blog application in my spare time to run my website on.
A fortnight ago I flew to Edinburgh to attend Scotland on Rails. In spite of his best efforts, I managed to persuade my friend John Conners to come along too, so that he could find out why I’ve been nagging him to take a look at Ruby on Rails for years. Although John’s an experienced software developer with C++ and .NET under his belt, I thought he might find it interesting to learn more about a dynamic and purer OO language such as Ruby.
I've been writing Java code on and off for about nine years now. I started out writing simple Java applications as part of an Open University course and for the past few years I've been employed professionally to write user interface code using Apache Struts for an internal enterprise Java application that weighs in with about one million lines of code.
With the new year comes a new commitment from me to start practising Test-Driven Development (TDD) for my Rails’ projects. Up until this point I’ve usually put off writing tests until towards the end of my projects, which obviously doesn’t lead to some of the benefits that TDD brings, such as increased confidence during refactoring or a cleaner model API design.
I’m in Berlin attending RailsConf Europe 2008. Today was the first day of the conference proper, following an optional day of tutorials yesterday. Following a welcome by Ruby guru David A. Black, the conference started with an hour-long keynote from Ruby on Rails creator David Heinemeier Hansson (DHH).
I’ve been beta testing Jeff Atwood’s and Joel Spolsky’s latest venture, Stack Overflow. In case you haven’t heard, Stack Overflow is a new site where programmers can go to get their programming questions answered by other programmers.
Not really a Rails-specific tip this one, more of a Ruby tip presented in a Rails’ context.
I’m pleased to report that my AssetsGraphed Ruby on Rails application has been running continuously for over two hundred days now, as the screenshot below taken from my installation of monit shows.
It’s something of a secret that you can configure the source code repositories the Rails plugin manager searches when you instruct it to install a plugin.
I just got a skeletal Ruby on Rails application running on a Java Virtual Machine using JRuby.
So True • Monday, 21 May 2007
I absolutely love this spoof commercial from the Rails Envy guys, so I make no apologies for embedding it here in case you haven’t seen it yet!
That got your attention, didn’t it? Maybe not deal of the century, but if you’re a UK-based Rails developer then you owe it to yourself to check out the PeepCode subscription packs.
Rails Envy • Thursday, 01 March 2007
Gregg Pollack and Jason Seifer have just started a great new Ruby on Rails blog named Rails Envy.
I recently added Shaun Inman’s superb Mint statistics package to my AssetGraphed Rails Machine installation. As the installation wasn’t particularly straightforward, I thought I’d write this little guide for others who may be struggling.
You may recall that a while ago I mentioned The Rails Way, which is a site where Rails core team members Jamis Buck and Michael Koziarski review code submissions and illustrate Rails best practices. Well, the big news is that they’ve started reviewing my code!
I’ve just finished moving AssetsGraphed over to Rails Machine. The application was originally hosted by TextDrive, on the same server as this site. I don’t have any complaints about TextDrive but it was clear that I needed something more substantial for AssetsGraphed.
I’ve just put my first Ruby on Rails application online. It’s called AssetsGraphed. It’s a free asset tracking application that also graphs your data.
You can use the built-in Rails console script to ask any model class for its associations.
If you’ve frozen a version of Rails into the vendor/rails directory then you can configure your application so that it doesn’t load frameworks that you aren’t using.
The Best Way • Thursday, 02 November 2006
One of the difficulties of learning a new programming language, framework or technology is that of knowing whether you’re doing things in the best way. Tutorials and books can only take you so far, then after that you’re flying solo staring at a terrifying blank screen in your editor or IDE.
Not really a Rails-specific tip this one, but worth mentioning because high quality open-source Ruby on Rails projects are starting to appear that you can learn from by studying their code.
Rake is Ruby’s equivalent of the UNIX make build tool.
Rails makes it dead easy to clean up objects in the HTTP session.
Rails comes with a number of Rake tasks for cleaning up various temporary files that get generated when you run your application.
You can use the built-in Rails console script to ask any model class for its column names.
Regular readers of my blog may be aware that I started out programming using Borland Delphi. Actually, that’s not really true—I started out programming on the PC using Delphi.
I just noticed this one myself. Whenever you create a new Rails application, it generates a README file in the application directory.
The first hot day of the summer, a garden, an Apple laptop and Ruby on Rails.
There’s built-in help available for the Rails (code) generators.
This is the first in a series of occasional bite-size Ruby on Rails tips that’s as much for the benefit of my memory as anything else.
Dan Benjamin over at Hivelogic writes about not exposing information about your Subversion repository if using Capistrano to deploy a Ruby on Rails application. Looks like required reading if you’re using these tools.