After playing around with Lighttpd’s rewrite abilities, I think I have a set-up that enables Mephisto caching goodness. The following is how I have chosen to configure Mephisto, so your mileage may vary:
1) Install Mephisto in your home directory (MEPHISTO_HOME).
2) For each domain you want to set-up, use a config like this:
I’ve create a code page to share plugins, extension, libraries, etc that I write. I seeded this page with three Mephisto plugins that I had put together for DCKickball. Enjoy!
I was recently provided with a PDF copy of Ruby on Rails – Up and Running by the Adams Morgan Ruby Users Group. As you can imagine, books on Ruby (and Rails) are about to flood the shelves as the publishing industry gets on the RoR bandwagon. I wanted to see how well a book could cover the fast-moving framework and in what ways it could improve my understanding of Rails.
The book is organized around creating a photo sharing web application step-by-step. Off the bat, I was puzzled to see “Installing Rails” as the last chapter in the book. Having a working runtime enhances the value of the book to the reader. On the flip side, I was pleased to see Mongrel mentioned as one of the web servers available for Rails development, a sign of the freshness of the content.
The authors develop the application from the ground up, tying general concepts (MVC, relational data, etc) into their Rails counterparts (ActiveRecord, etc). Explanations for certain design decisions (how ActiveRecord eschews mapping in favor of wrapping) are sprinkled through-out the book and provide an increasing sense of confidence in the framework.
Beyond the basic controllers, models and views, the authors provide details on enhancing their application with some judicious use of AJAX. They tie-up the development of the Photo Share application with an overview of the Rails testing framework, explaining the importance and ease of automated testing.
Overall, I give the book high marks. The book is excellent for anyone just getting into Rails development or looking for and end-to-end overview of the framework. The level of detail is limited, given the book’s 189 pages, so experienced developers may have less to gain. You will not read anything about RESTful Rails. It should also be noted that this book is focused on Rails, not Ruby, and contains little insight into the language.
This stands for the Adams Morgan Ruby Users Group. I’ve been asked to stop by their next meeting this Sunday at 3pm and spend 10 minutes talking about my experiences building RoR apps for DCKickball. Should be interesting. I’ve never been much into the “user group” scene, which is odd because I consider myself to be a pretty social person.
So, I’ve just finished importing 610 entries into my blog’s database. As I mentioned before, I had used a tool called Warrick to scour the caches of various search (Google, Yahoo, etc) and archiving (Internet Archive) services to reconstruct a snapshot of cubanlinks.org. This process left me with 1029 files scattered throughout 1106 directories.
(Remember, /archives/2003/12/01/some-post/index.html is comprised of 5 directories and 1 file)
So, the next step was to get these static files into the database. I accomplished this by writing a script in Ruby to extract title/date/body information from the page and insert these values into the database using ActiveRecord. Thank god for Typo being kind enough to fill in the other values for me on save (guid, permalink, etc).
It’s unclear how many posts never got recovered with Warrick in the first place. Eyeballing it, I’d say I have at least 80% of my posts. And you know what? I’ll take that.
I encountered a problem today with the Ruby on Rails application that I’m working on. It involved something that I haven’t found much information on-line about: many-to-many-to-many relationships.
if response
if response.body.chomp ‘VERIFIED’
# check the payment status
if payment_status ‘Completed’
# check to see if the txn_id already exists
# your logic here
end
end
else
# GET request, wtf
@text = ‘I do not speak GET’
end
rescue Net::HTTPError
@text = ‘HTTP error’
end
This method exists inside of a controller class. I’m certainly not saying that this is the best or most elegant way to handle this, just that I couldn’t find any examples to rip-off myself.
Let me know if you have any suggestions. WARNING: this code does not communicate with PayPal’s servers over SSL.
Play Poker Online at Full Tilt Poker Learn, Chat, and Play with the Pros at the fastest growing Online Poker Room.