Posted by Daniel Butler
Fri, 02 Jun 2006 02:26:00 GMT
Nominated for its mystery and hubris, I present you:
Ironically, this week's error message was brought to you by Hamachi's creators, our fine northern neighbors at Applied Networking, Inc., in Vancouver, Canada, eh?
Posted in Programming | Tags humor, irony | no comments
Posted by Daniel Butler
Thu, 01 Jun 2006 20:48:00 GMT
Belgian Damien Merenne has announced a plugin for Ruby on Rails that allows you to programatically keep track of a user's browsing history in your controllers.
Once enabled, you can use the following methods in your actions:
last_location: returns the last visited location, can be used with one numeric argument precising how many locations to go back in the history (1 by default),
redirect_back: redirect the user to the last location in history, it takes the same arguments as last_location,
store_location: force storing of the current location in the history.
And it's simple enough to use. Just add a bit of code like this to your controllers:
class ApplicationController < ActionController::Base
history :default => "http://default.url.com/",
:max => 10
end
Read about the Rails History Plugin
Posted in Ruby on Rails | Tags plugin | no comments
Posted by Daniel Butler
Tue, 30 May 2006 15:46:00 GMT
Kind of like making it to the cover of the Rolling Stone, Ruby has hit it big. Featured in the July 2006 issue of Linux Journal, the magazine contains many articles about Ruby's up-and-coming ubiquity:
Articles include:
- Opinions on Opinionated Software by Kevin Bedell
- Introduction to Ruby by Reuven M. Lerner
- RubyGems by Dirk Elmendorf
- Ruby as Enterprise Glue by Maik Schmidt
- Rails Writ Large an indepth article about contraints by Scott Raymond
Pick it up at your local techie newstand!
Linux Journal, July 2006 Contents
Posted in Ruby on Rails | Tags magazine | no comments
Posted by Daniel Butler
Tue, 30 May 2006 14:39:00 GMT
Benjamin Curtis and Andreas Viklund have launched the Ruby on Rails Plugins Directory. Benjamin describes the site as a place, "where you can find all Rails plugins you could possibly want. I'm always on the hunt for new plugins to add to the directory, so you can be lazy and just come here to find the latest and greatest contributions from the Rails community. There are RSS feeds to keep you up to date, and a recently added category if you're into the old-school way of getting updates."
You can even use the Rails Plugin Directory from the command line plugin script in your Rails application by executing the following:
script/plugin discover http://www.agilewebdevelopment.com/plugins/scrape
Complete Plugin List
Recently Added Plugins
Posted in Ruby on Rails | no comments
Posted by Daniel Butler
Sat, 27 May 2006 12:20:00 GMT
Wilco Bauwer has been working for the past few months on a Ruby interpreter for the .NET CLR, a project similar to IronPython. So far only some of the basics of the language are implemented, and current work includes incremental progress on OO features, Mixins, CLR integration, dynanamic methods, and Ruby file includes.
Wilco ids documenting the challenges in a paper for a college assignment, and will publish the paper once it is complete.
Read Wilco Bauwer's Blog
View Powerpoint Slides about the Project
Download IronRuby 0.0.1.0
Read on for a code example of implementing a simple media player in IronRuby.
Read more...
Posted in Ruby on Rails | Tags NET | no comments
Posted by Daniel Butler
Tue, 23 May 2006 11:20:00 GMT
Ezra Zygmuntowicz has announced the alpha release of a framework to help you manage long running background tasks in Ruby on Rails applications. Ezra describes it as follows:
BackgrounDRb is a small framework for divorcing long running tasks from Rails request/response cycle. With HTTP it is usually not a very good idea to keep a request waiting for a response for long running actions.
BackgrounDRb also allows for status updates that in combination with ajax can render live progress bars in the browser while the background worker task gets completed. The MiddleMan can also be used as a cache. You can store rendered templates or compute intensive results in the MiddleMan for use later.
DRb Progress Bar Movie
DRb Ajax Tail Demonstration Movie
Ezra's BackgroundDRb Article at brainspl.at
Read more for example code.
Read more...
Posted in Ruby on Rails | 2 comments
Posted by Daniel Butler
Sat, 20 May 2006 23:39:00 GMT
Jason King and Josh Susser had an interesting conversation about how to use ActiveRecord to achieve Polymorphic, many-to-many, self-referential associations on the Ruby on Rails mailing list. Jason describes his problem domain as having a:
Container which can contain one or more Element. An Element is a polymorph of either a Container or a Chunk. An Element can exist in one or more Containers. I use a table called ownerships as the join between Containers and Element.
Josh Susser, author of the has_many :through blog, attempts a solution. He describes his trick, "You have to disambiguate the two different associations to containers—one way is as your container, and the other is as an element. That means you need different names for those relationship. I chose "owner" to indicate an element's container from the element's perspective. You also have to use a different name for the two kinds of ownerships, containing and contained."
Read on for the final coded solution.
Read more...
Posted in Ruby on Rails, Programming | Tags polymorphic | 5 comments
Sky and Reflections, Okefenokee Swamp, Georgia (January 2006)