123
 123

Thu 05 March, 2009

Click here to bookmark this link.Channel Image19:34 Rails 2.3 RC2: Final stop before release» Riding Rails - home

The past month has seen a flurry of activity getting Rails 2.3 solid. We think we’ve ironed out all the major kinks now, but just to be sure, we’re running one last release candidate before it heads off to the presses. So please take some time to test out this release candidate. If we don’t get any reports of major blockers, we’re going to call this final within a week or two.

We’ve put together a complete guide for the Rails 2.3 release notes with all the information on what’s new, what’s changed, and what’s deprecated.

You can install the release candidate with:

gem install rails --source http://gems.rubyonrails.org
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:34 Rereading books I read in s...» Projectionist
Rereading books I read in stranger years. Suspicious of the ones that seem the same.

Scott David Herman


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:33 Don’t Go Near the Wat...» Projectionist

Don’t Go Near the Water – The Beach Boys


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:33 Scottish Bar Stool (for kilts)» Projectionist
Scottish_bar_stool

Scottish Bar Stool (for kilts)


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image02:36 Help Sponsor a Free Ruby Hoedown!» Lovable Lyle
At last year’s Ruby Hoedown, organizer Jeremy McAnally announced his intention to make this year’s Hoedown free for all conference attendees. Unfortunately, it seems that he hasn’t been able to enlist enough big sponsors to make that a reality, so he is reaching out to the Ruby community for donations. Jeremy has set a goal [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Wed 04 March, 2009

Click here to bookmark this link.Channel Image15:02 use Paperclip on Passenger(mod_rails)» Suave's Blog
之前在 mongrel 用 paperclip 一直没有问题, 这两天换到 passenger 上面发现上传图片生成缩略图的时候总说找不到文件, Google 之发现在 passenger 上面用 paperclip 需要手工声明一下 convert 命令的路径. 可...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:44 Hire Logan» James Britt - Code, Content, Caffiene

With Happy Camper Studios and Rising Tide Software soon to be memories, the people who gave those entities life are moving on to other things.

I’m continuing with contracting/consulting/product development, but my former business partner Logan Barnett, AKA Logustus, is looking for a more predictable gig.

If you are looking for world-class Ruby talent in the Phoenix AZ area, do not delay.

Hire him.

If you are looking for a kick-ass Ruby developer, hire Logan.

If you are looking for a kick-ass application designer, hire Logan.

If you are looking for a kick-ass co-worker, hire Logan.

Seriously, he’s really, really good.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Tue 03 March, 2009

Click here to bookmark this link.Channel Image23:41 重压之下» 梦想风暴

如果用一个词形容客户程序员,出现在我脑海中的第一个词就是,忙!忙着琢磨一个又一个方案,忙着编写一段又一段代码。

几乎每天,他们一大早就会出现办公室,8:30或是8:45的Stand Up,这是我在公司工作的时候,从来没有经历过的。看上去,他们的下班时间很早,17:30。不同于我们下班之后就回去休息,他们吃过晚饭之后,多半会选择重回办公室,继续工作。至于具体工作到什么时间,我就不得而知了。

为什么会这么忙,原因很简单,他们要做的事非常多,压力很大。

这种压力并非一种特殊的现像,我在这里接触了很多人,从基层的程序员,到各级负责人,从他们言语之中,我都可以清晰的感受到这种压力。正是这种压力的存在,让他们每天疲于奔命,应付各种各样的任务。其结果是,他们所要做的一切只是为了完成任务,很难有时间想想怎么把事情做得更好。

念书时总结的一条基本规律是,以100分为目标的人,拿个80分总是不成问题的,而目标定在60分的,不及格通常是最后的结果。同样的道理,当他们仅仅把目标定位在完成功能,这也似乎变成了一种可望不可及的目标。

在他们原有的开发方式中,当他们按照“计划”完成编码时,等待他们的是,不可预知的联调,因为他们对自己会有怎样的问题一无所知,对别人的代码会有怎样的问题一无所知。结果常常就是这个联调变成了最不可控的阶段。

客户之所以要引入敏捷,就是要改变这种开发状况。

之前的一些项目组,客户给了我们一个比较充分的实验空间,尽量减小压力,让我们有机会在里面充分引入各种各样的敏捷实践,所以,我们对他们的这种压力体会得还不是那么明显。最近,一段时间,因为一些特殊原因,外部压力增大了,我们在工作中也开始感受到这种压力,后来工作的一些项目组,很多实践就不如前面的几个组里面坚持的那么好。

人在压力下,倾向回到自己熟悉的道路上。虽然后几个项目也知道实施敏捷的好处,但在巨大的压力之下,他们就倾向于放弃新知识,回到他们习惯的工作方式上,因为那种工作方式看起来,产生代码的速度要快得多。

记得有一次交流,一个人问我们,为什么有些公司可以很好按照时间制定工作计划,我们的回答是,他们定的时间是合理的。一个不合理的工作计划,只会是一个恶性循环的开始。而且,越大的团队,这种伤害就会越大。

我们要做的工作,是让客户的日常开发合理起来。压力来临,我们意识到,仅仅是在项目组里把事情做合理,还远远不够。






add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:15 Free FXRuby Course Online at RubyLearning.org» Lovable Lyle
Satish Talim has announced that RubyLearning.org will be offering a free online course entitled “FXRuby: A Quick Start”, beginning March 14, 2009. RubyLearning.org is, among other things, the recipient of a 2008 Shorty Award in Education.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image03:56 Snow In Georgia 2009» Joey Gibson's Blog
On March 1, 2009, we here in the South finally got some snow. In fact, at my house, we got loads of snow. I took a bunch of photos at three different times during the day to document it. The first four photos were taken after it had been snowing for about one hour. The [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image03:56 I Have The Ears Of A Teenager - Ouch!» Joey Gibson's Blog
Supposedly only teenagers can hear the sound that is played for the test linked above. But I heard it, and it hurt my ears something fierce. Not fun at all.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Mon 02 March, 2009

Click here to bookmark this link.Channel Image18:46 mime-types version 1.16 has been released!» halostatue
After an excessive amount of time, I’ve released MIME::Types 1.16. The primary purpose of this release is compatibility with Ruby 1.9.1, but I haven’t ignored the latest IANA registered types. I have also picked up a few other types that others submitted as patches and scanned through the latest version (1.27) of the Perl MIME::Types [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sun 01 March, 2009

Click here to bookmark this link.Channel Image19:10 XSS and CSRF Vulnerabilities in the in_place_editing plugin» Riding Rails - home

We have been advised of several vulnerabilities in the in_place_editing plugin which was created prior to the 2.0.0 release of Ruby on Rails.

  • The actions generated by in_place_edit_for perform no verification of the request method, allowing a hostile website to bypass built in CSRF protection.
  • The the input controls generated by in_place_editor_field perform no output sanitization, leaving the application vulnerable to XSS attacks.

Users of all versions of the plugin are advised to update to the latest version contained in our git repository at:

git://github.com/rails/in_place_editing.git

For users who are unable to use git, we have provided a zip file containing the patched code. The patch containing the fix is available also.

Users of all versions of Rails prior to 2.0 are advised to stop using the in_place_editing functionality, or manually apply those changes to their version of Rails. If these changes are backported, this post will be updated to include a patch for the relevant versions of rails.

Thanks to Pawel Stradomski of Code Sprinters for reporting this bug to us and working so patiently with us to get it resolved.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Visualizing the Rails commit history» Riding Rails - home

Ilya Grigorik wrote up a post on generating a code swarm visualization from git repositories. He wrote gitter to feed the git commit info for the Rails repository and feed it to code swarm:

<object height="300" width="400"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2979844&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed allowfullscreen="true" type="application/x-shockwave-flash" src="http://vimeo.com/moogaloop.swf?clip_id=2979844&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" allowscriptaccess="always" height="300" width="400"></embed></object>
Ruby on Rails from Ilya Grigorik on Vimeo.

It’s worth checking out the HD version. Git was introduced around 4:40 :)


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 This Week in Rails 3.0» Riding Rails - home

Now that Rails 2.3 has hit the release candidate phase, some of the development effort is turning to Rails 3.0. With that activity heating up, it’s time to start keeping you all informed as to happenings on the 3.0 version of the Rails source. I’ll still be posting separate “This Week in Edge Rails” information focused on Rails 2.3, so you can keep straight which changes are ready now and which still lie in the relatively distant future.

The Vision

The Rails 3 vision is based on the announcement that was made in December: we’re bringing in the key ideas from Merb to Rails, including:

  • A more modular Rails core, so you can run applications with less than the full Rails stack
  • Performance optimizations
  • Framework agnosticism with sensible defaults
  • A tested and documented API for extensions

Rails 3 promises to substantially advance the state of the art in Ruby web frameworks, while still providing migration paths from Rails 2.x and Merb 1.x.

The Source Code

The Rails 3.0 branch in the main Rails project on GitHub is the place to be to see what’s going on:


git clone git://github.com/rails/rails.git
git checkout 3-0-unstable

As the branch name might tell you, this is still a fairly experimental place to be: you probably don’t want to roll this out for production applications just yet. But it is tested code (and it’s using continuous integration to stay that way), and it already includes substantial changes from Rails 2.x thanks to the efforts of Yehuda Katz, Joshua Peek, and others. The changes so far are focused on cleaning up and improving Rails internals, rather than on adding new features.

Action Dispatch

Action Dispatch is a new Rails component which lives in Action Pack (along with Action Controller and Action View). Action Dispatch is responsible for all the processing involved with dispatching requests: request and response handling, HTTP status codes, file uploads, URL and parameter parsing, session storage, and so on.

Action View Reorganization

There are substantial changes in the Action View internals. The overall goal was to clean up a bunch of special cases and extra hooks that had built up over the years, and to leave all callers into Action View using a single unified entry point. The code cleanup has been coupled with some rearrangement of the Action View source to make it easier to find bits of functionality. This was a substantial effort; if you’re interested in a detailed look at the refactoring, you can read up on it at Yehuda’s blog

Callback Optimizations

A new method of handling callbacks removes the need for iterating through the callback list at runtime, and provides a substantial speed improvement in this area of the code. Though this is a micro-optimization that may not have much effect by itself, the hope is that by carefully optimizing as many hot spots as possible we can get a visible overall speedup in page creation and delivery – which, after all, is the point of a web framework.

What’s Next?

Obviously, there’s a long distance between where we are today and the Rails 3.0 vision. We’re fortunate to have an excellent team of core programmers devoting substantial time to making that journey. The interim goal is still to have a beta version of Rails 3.0 out in time for RailsConf in May. You can help in the same ways as with earlier versions of Rails: download the source, start testing it with your applications, and submit your own ideas and patches to the Rails Lighthouse. Rails has been a joint effort of thousands of developers over the years, and Rails 3.0 will be no different in that regard.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 This Week in Edge Rails» Riding Rails - home

February 7, 2009 – February 13, 2009

It’s been a fairly busy week on the edge, but there are not a lot of new features to point at. That’s good: at this point in the release cycle, the team is concentrating on nailing down things to be solid even in strange circumstances. This is also the point at which your help is critical: if a change affects one of your applications, and you don’t tell anyone about it, you can’t expect a fix. You don’t need to be running your applications full-time on RC1, but please, check out edge Rails, try it out, and report anything that seems to be broken. Bonus points if you include tests to show the expected behavior, and super bonus points if you submit a patch to go with it.

View Rendering Changes

A series of commits have addressed some issues with view rendering. The end result is to improve the performance of view rendering in development mode, and to bring back template recompiling in production mode (so you can change a view and have the changes show up without having to restart the whole server). Some of this work is ported from rails-dev-boost and if you want to come up to speed on what’s been done here the best thing to do is read the Lighthouse ticket

Partial Scoping for Translations

A change to the translation API makes things easier and less repetitive to write key translations within partials. If you call translate(".foo") from the people/index.html.erb template, you’ll actually be calling I18n.translate("people.index.foo") If you don’t prepend the key with a period, then the API doesn’t scope, just as before.

commit

Nested Attributes API Change

The API for NestedAttributes has been changed so as to work better with existing associations. If you’ve just used this for nested model forms, the changes will probably be transparent to you, but if you’ve been deeper into the internals you should have a look at the discussion in Lighthouse as well as the code in the commit.

commit

Less Brittle Tests for Scaffolded Controllers

The automatically-generated functional tests for controllers generated with script/generate scaffold now use to_param instead of id to identify records, which should make them more resilient to changes in fixtures over time.

commit

TimeWithZone changes

There were some internal changes to TimeWithZone that make its code more readable and efficient. One change surfaces to the API: TimeWithZone#to_formatted_s is an alias for TimeWithZone#to_s.

commit

A New Inflection

Breaking a long-standing policy, there was actually a change to the built-in list of pluralizations this week: Rails now handles database/databases correctly. Remember, a foolish consistency is the hobgoblin of little minds, and please don’t take this as an invitation to reopen the old ticket 10919. The policy remains that you can add inflections in your own application’s initializers if you need to do so.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 This Week in Edge Rails» Riding Rails - home

January 31, 2009 – February 6, 2009

The big news in edge Rails this week, of course, is the release of Rails 2.3.0 RC1. There’s been a fair amount of activity in the days since that happened, much of it concerned with tidying things up and fixing bugs based on early adopter issues and feedback. Thanks for all the testing, and by all means keep it up!

Nested Form Support in Active Record and Action Pack

This one is big enough that it got a whole blog entry of its own (the version that was committed has minor changes from what you’ll see there). There are two main parts to this commit. First, Active Record can now update the attributes on nested models directly, provided you tell it to do so:


class Book < ActiveRecord::Base
  has_one :author
  has_many :pages

  accepts_nested_attributes_for :author, :pages
end

Turning on nested attributes enables a number of things, including automatic (and atomic) saving of a record together with its associated children, and child-aware validations. But the big visible one is nested form support. Provided the parent model accepts nested attributes for the child objects, you can create nested forms using form_for and field_for. These forms can be nested arbitrarily deep, allowing you to edit complex object hierarchies on a single view without excessive code. For example, given this model:


class Customer < ActiveRecord::Base
  has_many :orders

  accepts_nested_attributes_for :orders, 
    :allow_destroy => true
end

You can write this view in Rails 2.3:


<% form_for @customer do |customer_form| %>
  <div>
    <%= customer_form.label :name, 'Customer Name:' %>
    <%= customer_form.text_field :name %>
  </div>

  <!-- Here we call fields_for on the customer_form builder instance.
   The block is called for each member of the orders collection. -->
  <% customer_form.fields_for :orders do |order_form| %>
    <p>
      <div>
        <%= order_form.label :number, 'Order Number:' %>
        <%= order_form.text_field :number %>
      </div>

  <!-- The allow_destroy option in the model enables deletion of
   child records. -->
      <% unless order_form.object.new_record? %>
        <div>
          <%= order_form.label :_delete, 'Remove:' %>
          <%= order_form.check_box :_delete %>
        </div>
      <% end %>
    </p>
  <% end %>

  <%= customer_form.submit %>
<% end %>

For more information, see Ryan Daigle’s excellent What’s New in Edge Rails: Nested Object Forms.

commit

Rails Guides Rework

The Rails Guides have switched from using AsciiDoc markup to using Textile markup. This has a couple of benefits: first, it makes it easier to contribute to a guide. Second, it means that we can dispense with the compiled HTML versions of the guides in the Rails tree, because we can assume any developer can build from Textile. There’s a spiffy new look for the Guides web site too – check it out at the beta site.

commit

Scaffolding Changes

There were some cleanups to the code produced by script/generate scaffold – nothing too major, but they bring the controller and views more into line with current Rails best practices. Along the same lines, the “Riding the Rails” index.html page generated in new Rails applications now includes a link to the Rails Guides.

commit commit commit


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 This Week in Edge Rails» Riding Rails - home

February 14, 2009 – February 27, 2009

The sharp-eyed will notice that This Week covers two weeks this week. As Rails 2.3 approaches release, the core team is getting pickier about what goes into the source code, and is concentrating on fixing bugs. You can expect to see Rails 2.3 RC2 very soon, and that may be the last release candidate. So if you haven’t tested your own applications on Rails 2.3 yet, it’s time to do so. The edge code is generally stable right now, so it’s a great time to take a look.

Batch Processing

You can now process large numbers of records from an ActiveRecord model with less pressure on memory by using find_in_batches:


Customer.find_in_batches(:conditions => {:active => true}) do |customer_group|
  customer_group.each { |customer| customer.update_account_balance! }
end

You can pass most of the find options into find_in_batches. However, you cannot specify the order that records will be returned in (they will always be returned in ascending order of primary key, which must be an integer), or use the :limit option. Instead, use the :batch_size option, which defaults to 1000, to set the number of records that will be returned in each batch.

The new each method provides a wrapper around find_in_batches that returns individual records, with the find itself being done in batches (of 1000 by default):


Customer.each do |customer|
  customer.update_account_balance!
end

Note that you should only use this method when you have enough records to justify batch processing: for small numbers of records (less than 1000), you should just use the regular find methods with your own loop.

commit

A Note About Template Loading

After some extensive work by several authors (here’s the Lighthouse ticket), Rails 2.3 includes the ability to enable or disable cached templates for any particular environment. Cached templates give you a speed boost because they don’t check for a new template file when they’re rendered – but they also mean that you can’t replace a template “on the fly” without restarting the server.

In most cases, you’ll want template caching to be turned on in production, which you can do by making a setting in your production.rb file:


config.action_view.cache_template_loading = true

This line will be generated for you by default in a new Rails 2.3 application. But please note: if you’ve upgraded from an older version of Rails, you won’t have this setting in your production.rb and template caching will be off by default. Unless you really need the ability to update templates in production without restarting the server, you should be sure to add this setting when you upgrade.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 This Week in Edge Rails» Riding Rails - home

January 24, 2009 – January 30, 2009

This week we saw 35 commits in edge Rails – though many are bug fixes and minor things. Here’s one more preview of some of the recent and significant changes.

Localized Views

Rails can now provide localized views, depending on the locale that you have set. For example, suppose you have a Posts controller with a show action. By default, this will render app/views/posts/show.html.erb. But if you set I18n.locale = :da, it will render app/views/posts/show.da.html.erb. If the localized template isn’t present, the undecorated version will be used. Rails also includes I18n#available_locales and I18n::SimpleBackend#available_locales, which return an array of the translations that are available in the current Rails project.

commit commit

Reconnecting MySQL Connections

MySQL supports a reconnect flag in its connections – if set to true, then the client will try reconnecting to the server before giving up in case of a lost connection. You can now set reconnect = true for your MySQL connections in database.yml to get this behavior from a Rails application. The default is false, so the behavior of existing applications doesn’t change.

commit

Easier Testing for JDBC

To make life easier for anyone using Rails on JRuby, Active Record now includes test tasks for a bunch of database accessible via JDBC: Derby, H2, hsqldb, MySQL, PostgreSQL, and sqlite3 (the latter three are also available through non-JDBC connections, as you know). You need to have the database, the activerecord-jdbc-adapter gem installed, and the specific activerecord-jdbcdatabase-gem for the database you’re testing. Then you can run tests like this: jruby -S rake test_jdbcmysql (with similar tests for the other adapters, of course).

commit

HTTP Digest Authentication Support

This one first appeared a couple of weeks ago, but was reverted due to some problems with the initial implementation. Fortunately, the problems were resolved, and Rails 2.3 will ship with built-in support for HTTP digest authentication. Ryan Daigle published some sample code.

commit

grouped_options_for_select Helper Method

Action View already has a bunch of helpers to aid in generating select controls, but now there’s one more: grouped_options_for_select. This one accepts an array or hash of strings, and converts them into a string of option tags wrapped with optgroup tags. For example:


 grouped_options_for_select([["Hats", 
   ["Baseball Cap","Cowboy Hat"]]], 
   "Cowboy Hat", "Choose a product...")

returns


 <option value="">Choose a product...</option>
 <optgroup label="Hats">
   <option value="Baseball Cap">Baseball Cap</option>
   <option selected="selected" value="Cowboy Hat">
     Cowboy Hat
   </option>
 </optgroup>

commit


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 The State of the Wiki» Riding Rails - home

The new and revitalized Rails Wiki launched about two weeks ago, so it’s time for a progress report back to the Rails community. The short answer: things are going well. We’ve had nearly a hundred edits, dozens of topics put in place, and an active discussion on the wiki mailing list. Translators are already at work making the wiki content available in multiple languages. For topics ranging from a first Rails application walkthrough to handling timezones, the new wiki is already a spot to go for quality Rails content.

The wiki team has applied lessons learned from the old Rails wiki, which has gone from being a comfortable spot to find out a few things to a cluttered mess over the years. They started out by defining an overall structure and figuring out what warranted coverage in the wiki. Then they protected a few pages from edits and set up a login system to encourage accountability. The result, so far, is a very promising start at an information resource that can benefit all Rails developers.

But there’s plenty more to do. If you take a look at the new wiki home page you’ll find a bunch of topics in red with dashed underlines. Those are topics that we want, but that no one has written yet. If you have a few minutes to give back to the community, why not drop by? Whether it’s drafting a new topic from scratch, revising an existing topic to be more clear or correct, adding links to high-quality external resources, or translating the wiki into another language, there’s plenty left to do – and just about every Rails developer should be able to contribute.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Ruby / Rails Conferences» Riding Rails - home

When the economy hits a downturn this typically has an immediate effect on tech conferences. Many tech conferences cannot run successfully without sponsorships, and with companies becoming more conservative with spending the marketing budget is usually the first item to get cut.

So yet another way you can help Ruby and Rails Activism is by attending (supporting) a conference. Below you’ll find conferences coming up in the next 6 months. If you think I’ve missed one, or if the information is incorrect, please post a comment.

Acts as Conference

February 6-7 – Acts As Conference in Orlando, Florida

Cost: $125

RubyRx

February 19-21 – RubyRx in Durham, North Carolina

Cost: $550

MountainWest RubyConf 2009

March 12-14 – MountainWest RubyConf 2009 in Salt Lake City, Utah

Cost: $100

Scotland on Rails

March 26-28 – Scotland on Rails in Scotland, United Kingdom

Cost: £150

Locos X Rails

April 3-4 – Locos X Rails in Buenos Aires, Argentina

Cost: ?

LA Ruby Conf 2009

April 4 – LA Ruby Conf 2009 in Los Angeles, California

Cost: $75

Golden Gate Ruby Conference

April 17-18 – Golden Gate Ruby Conference in San Francisco, California

Cost: ?

RailsConf 2009

May 4-7 – RailsConf 2009 in Las Vegas, Nevada

Cost: $695

Euruko 2009

May 9-10 – Euruko 2009 in Barcelona, Spain

Cost: 30 Euro

RailsCamp 5

May 15-18 – RailsCamp 5 in Brisbane, Australia

Cost: $120 AUD

Update

Since I initially wrote up this post, there have been several more events I’ve been made aware of (from the comments):

It’s pretty cool to see more RubyCamps. I’m a big fan of BarCamp type events where you keep admission free. Perhaps in this financial climate these types of events will prosper more then they normally do. Feel free to bug me if you want help putting one of these together or need help with publicity.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Rails Guides Gets a Facelift» Riding Rails - home

There’s a brand new version of Rails coming, as you already know. What better time for a new version of some of the Rails documentation? So the Rails Guides team is pleased to announce a refresh of the Ruby on Rails Guides site, just in time for the Rails 2.3 release.

The most obvious change you’ll see is a new look, thanks to some awesome design work from Jason Zimdars. But the visual refresh isn’t all that’s going on here. We’ve also been working to update the Guides for Rails 2.3, as well as to add new guides to the list.

And there’s good news if you want to get involved too. Behind the scenes, Tore and Pratik switched our markup engine from AsciiDoc to Textile. This makes the Guides easier to write and edit and easier to build into a Rails project. If you’ve got some spare time to help out, join us in the #docrails room on irc.freenode.net, and help make the Rails Guides into a great resource in time for the 2.3 release.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Rails 2.3.0 RC1: Templates, Engines, Rack, Metal, much more!» Riding Rails - home

Rails 2.3 is almost ready for release, but this package is so stock full of amazing new stuff that we’re making dutifully sure that everything works right before we call it official.

So please help us do thorough testing of this release candidate. Lots of the underpinnings changed. Especially the move to Rack. So we need solid testing and will probably have a slightly longer than average release candidate phase to account for that.

But boy will it be worth it. This is one of the most substantial upgrades to Rails in a very long time. A brief rundown of the top hitters:

  • Templates: Allows your new skeleton Rails application to be built your way with your default stack of gems, configs, and more.
  • Engines: Share reusable application pieces complete with routes that Just Work, models, view paths, and the works.
  • Rack: Rails now runs on Rack which gives you access to all the middleware goodness.
  • Metal: Write super fast pieces of optimized logic that routes around Action Controller.
  • Nested forms: Deal with complex forms so much easier.

And that’s just the tip of the iceberg. We’ve put together a complete guide for the Rails 2.3 release notes with much more information.

You can install the release candidate with:

gem install rails --source http://gems.rubyonrails.org

Enjoy, report the bugs, and let’s get Rails 2.3 final out the door soon.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Calling All Rails-Savvy Designers» Riding Rails - home

One thing that has been a continuing challenge for many Rails developers is finding a good designer to work with. There are certainly plenty of fantastic designers out there, but it’s often difficult to find one who is comfortable working directly in a Rails project.

In an effort to help ease this challenge, and at the behest of some interested developers and designers, the Rails Activists have set up a group for Ruby Graphics Designers. The idea is to have a place for communication: a spot where designers can ask questions about git or erb, or where developers can try to find a designer to work with.

Of course, a group without participation is nothing to crow about. If you’re a developer – or especially if you’re a designer who works with Rails – we’d love to have your participation. If you’re interested in the visual design and information architecture of Rails applications, c’mon by and say hi! And if you have other ideas about how we can encourage closer collaboration between the Rails community and the design community, we’d love to hear them.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 Autoloading ActiveResource schemas» Riding Rails - home

I just committed a little feature during our Rails core hackfest in Chicago: Autoloading ActiveResource schemas. Note: this is in my personal fork that’s up to date with the rails repo, and will probably be merged in for Rails 2.3.

I’ve received some requests for this from people having problems using Lighthouse::Ticket records with form_for helpers in their Rails apps. The idea is that resources can automatically load the starting XML just once, like the way ActiveRecord loads the schema from the database. This is already part of the current Rails scaffolding:


class PostsController < ApplicationController
  def new
    @post = Post.new
    respond_to do |format|
      format.html # new.html.erb
      format.xml { render :xml => @post }
    end
  end
end

There is one problem though, this probably won’t work for protected or nested actions. Ideally a Rails app will set a top level route for the resource, and disable any before filters if request.format.xml? is true.


map.route 'tickets/new.:format', :controller => 'tickets', :action => 'new'

You can get around this by modifying the #schema hash directly, or calling #reset_schema with your own prefixes. Here’s a sample using the Lighthouse API lib.


Lighthouse.account = 'entp'
Lighthouse.token = 'monkey'
Lighthouse::Ticket.reset_schema :project_id => 1

# or, use a well known public project
Lighthouse.account = 'rails'
Lighthouse::Ticket.reset_schema :project_id => 8994
Ticket.new # => #<Lighthouse::Ticket:0x1707898 @attributes={"permalink"=>nil, "updated_at"=>nil, "number"=>nil, "title"=>nil, "creator_id"=>nil, "tag"=>nil, "attachments_count"=>0, "priority"=>0, "closed"=>false, "assigned_user_id"=>nil, "user_id"=>nil, "created_at"=>nil, "state"=>nil, "milestone_id"=>nil}, @prefix_options={:project_id=>8994}>

Comments?


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:10 2009 Ruby Hero Awards» Riding Rails - home

There are many people in the Ruby community who contribute to our blossoming ecosystem. Some do this by producing educational content and others by contributing to open source libraries or helping out newcomers to the Ruby language. Every week I do my best to help promote the work of these people by talking about the most interesting bits on the Rails Envy Podcast. However, sometimes it just doesn’t seem like enough.

There are some developers who contribute to the community above and beyond the others. These people don’t always get the recognition they deserve, which is why last year I put together the Ruby Hero Awards. Hundreds of people submitted nominations and at RailsConf 2008 we gave away 6 awards to people in our community who deserved a round of applause.

Last year we gave awards to Ryan Bates, Yehuda Katz, Ilya Grigorik, Evan Weaver, Tom Copeland, and James Edward Gray II. This year we’re looking for 6 more people to give awards to and we need your nominations to figure out who you think deserves one. Three things to keep in mind here:

  • We’re looking for people who do not get their deserved recognition. For example, any of those Rails Activists and Rails Core members are out of the running.
  • When you submit a nomination you’ll have to enter 25 words as to why you think someone should be nominated.
  • The final 6 award winners will be determined by having the 6 winners from the previous year voting on them. The nominations you submit will certainly play a big factor in this decision, but won’t be the determining factor (this keeps things from turning into a popularity contest). So please don’t post to your blog telling all your friends to “Nominate You”, it ain’t gonna work.

The 6 winners will be announced on stage at RailsConf 2009, which is just around the corner. So if you know someone Ruby or Rails community who deserves some recognition, please take 2 minutes and submit a nomination for them.

Photo Credits: Ruby Hero Awards by Duncan Davidson, IMG_5428 by wyros


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:53 Heartbreaking Photos From the Congo» Joey Gibson's Blog
You simply must see these images. It’s a pictorial of “life” in the “Democratic” Republic of Congo. As in many African countries, long-running civil wars between enemy tribes take an almost unbelievable human toll. The photos in this pictorial show what a truly miserable existence these people have. The little boy in the photo to the [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sat 28 February, 2009

Click here to bookmark this link.Channel Image01:10 Blue At The Mizzen - Finished» Joey Gibson's Blog
This morning I finished reading Blue At The Mizzen, the last complete book in the twenty-book Aubrey-Maturin series by Patrick O’Brian. I’m a huge fan of these books: I have read the first fourteen books twice, and only once before have I given any of them fewer than five stars. This last book, unfortunately, has [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Thu 26 February, 2009

Click here to bookmark this link.Channel Image23:03 撞了南墙好回头» 梦想风暴

今天,Darwin和我接到客户公司另一个部门的邀请,同他们交流敏捷。

由于资源有限,我们只能投入到一个部门,所以,和我们交流的这个部门并没有我们的投入。他们几个负责人参加过我们先行的几个同事在这里所做培训,自己也从书上和网上了解了敏捷的一些理念和实践,另外,他们也和我们投入的部门进行的一些交流,并把一些成果引入到他们的团队中,比如单元测试的方案。他们的敏捷之旅就这样开始了。

看上去很美的一切,在真正投入到实践中之后,变成了种种的困惑和疑问。撞了南墙的他们选择了在今天找到了一个和我们交流。

“让我们把问题列一下吧!”,他们的负责人说。

“需求分析不完整”,“TDD不好做”,“单元测试框架不好用”,“Review大家都不愿意做”,“没有勇气做重构”,……

终于有了机会把憋了许久的怨气一下释放出来,大家你一句我一句,白板上一会就写满了各种各样的问题。一时间,空气中有一种剑拔弩张的氛围。

“首先,让我们放下敏捷,这些问题里面,有哪些是用你们原来的工作方式可以很好解决的。”,Darwin站在白板前问了这样一个问题。

“我觉得ST那条我们可以做好”,一个人指着其中一条ST测试不完整的问题说道,“我们原来都有很好的指导书。”

“那为什么不用原来的方式呢?”,Darwin问。

“不是要敏捷吗?”,这个人显然没有想到Darwin会问出这样的话,回答的口气明显没有刚刚那样强硬。

“OK,我们做敏捷,追求的是有效的工作方式,既然原来的方式很好,那我们继续做就好了。”,Darwin这样回答。

我坐在下面,暗自观察了其他人表情,刚刚那种准备挑战的表情明显开始转变了。

一个好的开头,让我们有了很好的讨论基础,于是,我们就着他们提出的问题一个一个进行解答。随着讨论逐渐的深入,我看见大家频频在那里点头,这也增强了我们的信心。

讨论的过程中,一个人说出了一个给我留下深刻印象的词,“伪敏捷”。在他看来,他们所做的只有敏捷的架子,而其他的一切还是按照旧有的套路。和我们的讨论,让他发现了很多彼此在考虑问题思路上的根本差异,这给了他们一个在日后改进工作打下了一个很好的基础。

后来,和Darwin聊天,我说,我喜欢这样有了一定基础的客户,他们自己尝试吃了亏,和我们交流时,才能真正体会到我们说的那些东西。






add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Sources