You can use the Rails logger outside of Rails models in at least version 2.3.X and up of Rails. You might be used to doing the following in your models or controllers: logger.info "Some debugging info I want to see in my development log." If you make a regular model that doesn’t inherit from ActiveRecord, [...]
Getting RSpec and TextMate to play nice
by Jason on 05. Aug, 2009 in Ruby
Elijah Miller has a great blog post on getting TextMate and RSpec to play nicely together. This is pretty useful for just running specific spec files. Also, did you know you can get TextMate to automatically recognize spec files by naming them with the .spec extension and RSpec will recognize it? Link Delicious Digg This [...]
Microsoft deems Ruby on Rails a competitor
by Jason on 05. Aug, 2009 in Ruby
Numerous commercial software vendors offer competing software applications for connectivity (both Internet and intranet), security, hosting, and e-business servers. System Center competes with server management and server virtualization platform providers, such as BMC, CA, Inc., Hewlett-Packard, IBM, and VMWare in the management of information technology infrastructures. Forefront security products compete with McAfee, Symantec, and Trend [...]
Receiving Email with Rails
by Jason on 24. Apr, 2009 in Ruby
This article originally appeared in the first issue of Rails Magazine. It is reproduced here not quite verbatim with a couple of corrections and additions. Photo from esparta on Flickr. Introduction Receiving email is a great way to add functionality to your application. This is one area, though, that is not very well documented with [...]
32 Rack Resources to Get You Started
by Jason on 08. Apr, 2009 in Ruby
Rack What the heck is Rack and why is it getting so much press lately? Well, from it’s tag-line: “Rack provides an minimal interface between webservers supporting Ruby and Ruby frameworks.” But what does that mean? Prior to Rack if you wanted to interface with Mongrel or Thin you had to write your own custom [...]
Rails metal call order
by Jason on 08. Apr, 2009 in Ruby
I was really mystified today trying to figure out how to bump up the response in Rails metal. The default metal generator generates something that looks like the following: I had mistakenly changed it to 500 and didn’t realize why the app completely broke. It turns out that Rails itself uses a 404 code in [...]
Passenger 2.1.1 and Local Production Environment
by Jason on 04. Mar, 2009 in Ruby
If you’re on the passenger 2.1.1 beta and having problems locally with getting your rails apps to not be in the production environment, read on.
Ruby Hash Trickery
by Jason on 03. Mar, 2009 in Ruby, Uncategorized
Ilya Grigorick put up a pretty cool pastie showing a neat hack to make Ruby hashes raise errors with invalid keys: Delicious Digg This Post Facebook Reddit This Post
About




