Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

By Peter Cooper / September 6, 2006

Bob Silva presents a rundown of some new features due in Rails 1.2. These minor features are in addition to the full REST support and ActiveResource (supposedly not just yet), as previously covered by a multitude of blogs.

David Heinemeier Hansson says Rails 1.2 won’t be released before RailsConf Europe (in a couple of weeks’ time) but a Release Candidate may be available. Judging from previous releases, I’d personally speculate we could expect Rails 1.2 to be released in mid October, but don’t hold me to that. Read More

By Peter Cooper / September 5, 2006

Sitepointsurvey
Josh Catone looks at the results of SitePoint’s State of Web Development 2006 survey. Josh says:

According to respondents Ruby is used as a development platform by 5.31%, well behind PHP’s dominating 67.54% market penetration. However, when asked what platforms people were not currently developing for but planning to use in the next twelve months, Ruby was the answer of 24.37% of respondents!

Of more immediate interest to me is that Python only takes 2.96% of the vote and Perl has 9.79% of the vote. And in response to “What server platform(s) are you not developing for, but expect to in the next 12 months?” Ruby takes 24.37% of the vote in comparison to just 8.47% for Python. Read More

By Peter Cooper / September 5, 2006

The ‘Unofficial Ruby on Rails Blog‘ has put together a great article about how to install Ruby, Ruby on Rails, MySQL, and RMagick on Windows. It gives the ideal places to download each part from in order to avoid nasty errors, and should act as a good resource for any Windows-based developers to set up their environment. Read More

By Peter Cooper / September 5, 2006

Chris Wanstrath has put together an excellent guide to sessions in Ruby on Rails. He covers a whole ton of gotchas and features that I’d never known about before. Did you know that if you specify session :off in your application.rb that session can still be created automatically in certain situations? If not, check it out, there’s a lot of great information. Read More

By Peter Cooper / September 3, 2006

Railstat

RailStat is an open-source real-time Web site statistics package written in Ruby on Rails. It’s not particularly advanced, but covers all of the main areas and provides another quality application to the still reasonably small group of open-source Rails applications. Excellent!

(Found via the always amazing ozmm.org) Read More

By Peter Cooper / September 3, 2006

Eric Hodel has put together a great guide to optimizing Ruby code with RubyInline and ruby-prof, a code profiler.

Here’s how I optimized png.rb to make PNG saving over 100 times faster using RubyInline. This is a good model to follow to make any ruby program faster.

The basic steps are to optimizing code are:

1. Profile
2. Find the method taking the most time
3. Try one change to make it faster
4. Profile
5. Check for improvement
* No improvement? Not enough improvement? Remove your change, go to step 3
* Improvement? Go to step 1 Read More

By Peter Cooper / September 1, 2006

Johnny of Johnny’s Thoughts has put together a brief article / tutorial about implementing full text search with tagging in a Ruby on Rails application. He uses Ferret, a Ruby port of Lucene, the acts_as_ferret Rails plugin, and ActsAsTaggable. Read More

By Peter Cooper / August 31, 2006

Rakemin

One of my clients has a multi-application rollout system in place that operates on Rake tasks (Capistrano wasn’t viable). The Rake tasks are centralized with the application and need to be run from the deployment boxes. As their developers aren’t au-fait with the command line, they wanted an easy way to run Rake tasks on arbitrary applications over the Web. I decided I could write a tool to do this, and I have.. it’s called Rakemin.

It’s all AJAX, quick, and all you have to do is specify the ‘base directory’ where all of your Rails applications live, and it’ll hunt out all the projects for you. Read More

By Peter Cooper / August 31, 2006

On the back of Kevin Clark’s “Things You Shouldn’t Be Doing in Rails”, Geoffrey Grosenbach has created a plugin called ‘deprecated‘ that, with a single rake task, will alert you to all of the old and deprecated code in your application. This is perfect for bringing those old applications up to date and will help you catch all of the changes necessary, such as using flash and session instead of @flash and @session, etc.

I wonder how viable it would be to go even further and create something that could check for sloppy coding practices (rather than outdated practices) and fix spacing issues, etc. Read More

By Peter Cooper / August 31, 2006

Eric Hodel has worked out a scary way to reduce Ruby’s safe-level on the fly using a little inline C. Please don’t use this in production code, it’s just an experiment! That said, this could be a useful trick for things like Classroom and sandboxing environments. Read More

By Peter Cooper / August 31, 2006

Hotscripts

HotScripts.com, a popular destination for finding PHP and CGI scripts, has added a Ruby on Rails category. Currently only 30 resources are listed, but as one of the heavyweights in the Web developer resources industry, it’s likely to get a lot bigger soon. If you’re a developer you might want to get your stuff added while it’s still small.

(Thanks to Peter Scott for the tip-off!) Read More

By Peter Cooper / August 31, 2006

def foo
‘bar’
end

module M
def foo
‘baz’
end
end

puts "should be ‘bar’: #{foo}"

self.dup.instance_eval do
extend(M)
puts "should be ‘baz’: #{foo}"
end

puts "should be ‘bar’: #{foo}"

Garry Dolley worked out some interesting Ruby-fu to create a temporary execution context on the fly using self.dup.instance_eval. Any other tricks we could use this for? Read More

By Peter Cooper / August 30, 2006

Kevin Clark presents “Things You Shouldn’t Be Doing in Rails“. It’s not a list of things Rails isn’t any good for, rather it’s features or concepts related to Rails that you shouldn’t be using. It covers deprecated finders, the in-built pagination classes, scaffolding, engines, layouts, and namespaced controllers. Read More

By Peter Cooper / August 29, 2006

Giftcertificates

The Money Train is a great book being written by Benjamin Curtis about building e-commerce sites using Ruby on Rails. It’s released as a ‘beta book’ meaning you can buy and read it in PDF form straight away, but over time you’ll get tons of free updates and eventually the full, completed book (in PDF format). Even better, it’s only $12!

It has some pretty cool ‘e-commerce recipes’ in it, so it’s worth getting for those. It covers the basic such as products, variants of products, related products, and customer reviews.. through to gift certificates, shipping, carts, payment processing, and affiliate referrals. Read More

By Peter Cooper / August 29, 2006

FileList["**/*.rb"].egrep(Regexp.new(ARGV.first))

Jim Weirich has an interesting blog post about using Rake’s ‘FileList’ class to find files on your hard drive. I’ve already started to use the example he gives here.. good find! Read More

Recently Popular Posts