This post originated from an RSS feed registered with Ruby Buzz
by Florian Frank.
Original Post: Rubygems Sidebar for Typo
Feed Title: The Rubylution: Tag Ruby
Feed URL: http://rubylution.ping.de/xml/rss/tag/ruby/feed.xml
Feed Description: Starts… Now.
I have just updated my blog's Rubygems sidebar a bit. I experienced some difficulties with my previous approach to let the blog application fetch the gem source index itself: It seemed to hang from time to time. I am not quite sure why that happened.
Now I just read the cached index from the $HOME/.gem/source_cache file, where $HOME is the home directory with correct permissions for the user under which my blog runs.
To update this cache I periodically execute
gem list --source=http://gems.rubyforge.org -r >/dev/null
in the cron of my blog user.
Here's a
gzipped tar archive
of the sidebar. It can just be extracted into the typo src dir.
After extraction a require dependecy has to be added to typo:
After restarting this should take care of loading the rubygems aggregation on demand. Now the sidebar can be configured through typo's admin interface with some AJAX magic. W00t!