Friday, 05 Feb 2010

Rails 3.0 Beta

David Heinemeier Hansson: You thought we were never going to get to this day, didn’t you? Ye of little faith. Because here is the first real, public release of Rails 3.0 in the form of a beta package that we’ve toiled long and hard over.  It’s surely not perfect yet, but we were out of blockers on the list, so here we go. Please give it a run around the block, try to update some old applications, try to start some new ones, and report back all the issues you find.

For those who have purchased (or who have yet to purchase) Agile Web Development with Rails, Edition 3, I’ve begun a page which details the differences that affect what is described in the book.

P P

David Heinemeier Hansson: You thought we were never going to get to this day, didn’t you? Ye of little faith. Because here is the first real, public release of Rails 3.0 in the form of a beta package that we’ve toiled long and hard over.  It’s surely not perfect yet, but we were out of blockers on the list, so here we go. Please give it a run around the block, try to update some old applications, try to start some new ones, and report back all the issues you find.

For those who have purchased (or who have yet to purchase) Agile Web Development with Rails, Edition 3, I’ve begun a page which details the differences that affect what is described in the book.  Edition 3 was based on Rails 2.2.2, and this page is cumulative.  My perception is that the differences that affect applications is way less than the differences between Rails 1 and Rails 2, and frankly not much more than the differences between Rails 2.2 and Rails 2.3.

Work on Edition 4 is well underway, and now that Rails has shipped a beta, I’ll may be able to get a beta of the book out by the end of the month.  It will not only be based on Rails 3.0, but will also be focused on current best practices and new APIs.

Things I am tracking at this point: a RubyInstaller for Windows that supports a version of Ruby that Rails can run on, a version of the will_paginate gem that works on Rails 3.0 which was just made available last night and I will be testing with it today, a regression in the (yet to be released) Ruby 1.8.8 that will affect both Builder and Rails, and some inconsistencies in how I18n YAML files are treated with respect to html_safe.

Posted at 07:07 EST | Comments

Monday, 01 Feb 2010

Rails 3.0 on Cygwin

Rails 3.0 requires 1.8.7 or later. Both InstantRails and the (current, released) version of RubyInstaller bundle Ruby 1.8.6.  The files on the Ruby site seem to be a scavenger hunt.  While the next release of RubyInstaller will address this, we can run today with Cygwin.

Rails 3.0 requires 1.8.7 or later. Both InstantRails and the (current, released) version of RubyInstaller bundle Ruby 1.8.6.  The files on the Ruby site seem to be a scavenger hunt.  While the next release of RubyInstaller will address this, we can run today with Cygwin.

On the right of the Cygwin page you will find a link to “Install Cygwin now”.  The UI for the installation is a little unusual, the basic process is documented here.

When you get to step 15 (yes, step 15), you will want to select the following:

Hint: I find it is easiest to first click on view (top right) to get a alphabetical list of all packages, then use the search box (top left) to filter the list, and then select the individual packages.

Cygwin itself provides a minimal shell window.  You can use the Console program to give you a nicer window.  This program doesn’t have a proper installer, instead you simply unzip the file you downloaded.  In the directory that produced, create a shortcut to the Console executable (right click on Console, select “Create shortcut”) and then drag that shortcut out to some place where you can find it later (e.g., desktop or quick launch toolbar).  Launch a Console window using this shortcut to see a Windows command prompt.  Select Edit -> Settings, and set the shell to C:\cygwin\bin\bash -l.  Select OK, then exit and relaunch the console and you now have a bash prompt.

Notepad++ is a free editor that understands Unix conventions.  Select and run the installer from here.  Launch Notepad++, and from there navigate to your bash configuration file:

  File → Open → Computer → c: → cygwin → home → yourname → .bashrc

Insert the following at the bottom:

alias edit='cygstart "/cygdrive/c/Program Files (x86)/Notepad++/notepad++.exe"'

You might need to adjust this path slightly.  On Windows XP, for example, I don’t seem to have the “ (x86)” part.  Once complete, save the file.  Now close any open Console windows and launch a new one.  Inside that console, execute the following commands:

wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzf rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup
cd ..
gem install sqlite3-ruby

Now you can install rails normally (gem install rails), or checkout the latest using git.  You can now edit files (e.g., config/database.yml) using the alias you set up:

edit config/database.yml

Results following the scenario described in AWDwR3 closely match results on Ubuntu.

Posted at 21:10 EST | Comments

Sunday, 31 Jan 2010

FireBug + Ubuntu + AMD64

Tools => AddOns => Extensions => Firebug 1.5.0 => Uninstall => Uninstall => Restart Firefox

sudo apt-get install firebug

Restart Firefox

Fixes bug 449744.

Posted at 10:35 EST | Comments

Friday, 29 Jan 2010

Evolution of Tinkering

Jim Stogdill: The automobile went through a similar evolution. From eminently hackable to hood essentially sealed shut. When the automobile was new, you HAD to be a mechanic to own one. Later, being a mechanic gave you the option of tinkering and adapting it to your specific interests. In fact, that’s how most people up until about 1985 learned to be mechanics.

Jim Stogdill: The automobile went through a similar evolution. From eminently hackable to hood essentially sealed shut. When the automobile was new, you HAD to be a mechanic to own one. Later, being a mechanic gave you the option of tinkering and adapting it to your specific interests. In fact, that’s how most people up until about 1985 learned to be mechanics.

Posted at 18:13 EST | Comments

Thursday, 28 Jan 2010

Secretary Workflow

The next step of automating the workflow of the Apache Software Foundation secretarial task went operational today: automatic sending of confirmation emails once documents are received and filed.

The next step of automating the workflow of the Apache Software Foundation secretarial task went operational today.  The current flow now looks like this:

More details on the mail merge described in step 5.  It starts with a configuration file.  Here’s mine:

require 'rubygems'
require 'mail'

Mail.defaults do
  smtp do
    host 'smtp-server.nc.rr.com'
    helo 'intertwingly.net'
  end

  @from = 'Sam Ruby <secretary@apache.org>'
  @sig = %{
    -- Sam Ruby
    Secretary, Apache Software Foundation
  }
end

Plus an ERB template file:

to:   <%= pubname.inspect %> <<%= email %>>
from: <%= from %>
cc:   secretary@apache.org
bcc:  <%= bcc %>
subject: Your ICLA sent to Apache Secretary

Dear <%= pubname %>,

This message acknowledges receipt of your ICLA, which has been filed in the Apache Software Foundation records.

<%= sig %>

And ultimately, it is processed thus (where vars is an OpenStruct, initially populated with data from HTML forms input and svn properties):

# extract fields from the Mail defaults
Mail.defaults do
  vars.sig  = instance_eval {@sig.gsub(/^ +/,'').strip}
  vars.from = instance_eval {@from}
  vars.bcc  = instance_eval {@bcc}
end

# expand template
message = ERB.new(open(template).read).result(vars.send(:binding))
headers = message.slice!(/\A(\w+: .*\r?\n)*(\r?\n)*/)

mail = Mail.new do
  # apply headers
  headers.scan(/(\w+):[ \t]*(.*)/).each do |name, value|
    send name, value unless value.empty?
  end

  body message

  # is this a reply?
  if vars.email_id
    in_reply_to vars.email_id
    references  vars.email_id

    # override subject?
    if vars.email_subject and !vars.email_subject.empty?
      subject 're: ' + vars.email_subject
    end
  end
end

# add additional cc if email:addr != email
if vars.email_addr and vars.email_addr != vars.email
  if vars.email_name
    cc = "#{vars.email_name.inspect} <#{vars.email_addr}>"
  else
    cc = vars.email_addr
  end

  mail.cc = (mail.cc + [cc]).join(', ')
end

# ship it!
mail.deliver!
Posted at 13:40 EST | Comments

Think Different

Tim Bray For creative people, this device is nothing.  Tim also is quite concerned about losing access to emacs.

Imagine a 2.66GHz Intel computer with five USB 2.0 ports, one FireWire 800 port, a mini-DVI port, and a DVD burner.  Comes with a wireless keyboard and a 9.7 inch wireless display.  The display is fully touch enabled, and can even support a virtual keyboard.  Yes, this system runs EMACs.  It also can run J2EE, Ruby on Rails, and Django.  The display connects to the base station via 802.11, and supports both canvas and AJAX.  Comes with OS/X, but you can also install Windows 7 and/or Linux alongside it if that is your preference.

Tim Bray For creative people, this device is nothing.  Tim also is quite concerned about losing access to emacs.

In the 70s, text ruled.  In the 90s, GUIs and mice ruled.  In the 10s, touch.

I can get to the Internet from my server, from my desktop, from my laptop, from my netbook, and from my phone.  While my next phone will undoubtedly support touch, my current one does not.  None of my other devices do, and frankly, they should not.

Imagine a 2.66GHz Intel computer with five USB 2.0 ports, one FireWire 800 port, a mini-DVI port, and a DVD burner.  Comes with a wireless keyboard and a 9.7 inch wireless display.  The display is fully touch enabled, and can even support a virtual keyboard.  Yes, this system runs EMACs.  It also can run J2EE, Ruby on Rails, and Django.  The display connects to the base station via 802.11, and supports both canvas and AJAX.  Comes with OS/X, but you can also install Windows 7 and/or Linux alongside it if that is your preference.

Would such a system be worth $1,200?  If so, you can have it in 60 days: $599 + $499 + $69 + $25 + $5.

Even better, the system is modular.  You not only can connect to your base station, but to any node on the network, be it in a humble printer or the glorious cloud.  In fact, if you already have one or more of nodes that you are interested in, you can omit the base station and keyboard, and get started for half the price quoted above.

In short, I’m with Yehuda.  If you wish to be open, you simply need to be creative.  Best of all from my perspective: I’m confident that everything the iPad has to offer, plus video camera, plus VoIP will be available from multiple sources in the $200-$299 price range by late 2012.  See also Charles Nutter’s take.

Posted at 10:32 EST | Comments

Wednesday, 27 Jan 2010

Retro Virus

Randall Munroe: HAHA, CLEANING VIRUSES?  MAN, WHAT A BLAST FROM THE PAST!

How timely.  Within the past week, both my sister-in-law and my wife’s netbooks got hit by viruses.  I spent yesterday wiping and reinstalling my wife’s machine.  While many of the details have changed, the overall process was very familiar.

Randall Munroe: HAHA, CLEANING VIRUSES?  MAN, WHAT A BLAST FROM THE PAST!

How timely.  Within the past week, both my sister-in-law and my wife’s netbooks got hit by viruses.  I spent yesterday wiping and reinstalling my wife’s machine.  While many of the details have changed, the overall process was very familiar: install Ubuntu to a USB drive, boot Ubuntu, rsync all of the files off the machine, reset to factory settings, install numerous updates, install a virus scanner, install firefox, thunderbird, pidgin, and printer drivers; copy over profiles and settings, and the data files that were on her Desktop.

Since my sister-in-law is three hours away, and only uses her netbook for the net, she may get upgraded to Ubuntu.  Particularly as I don’t know if it is possible to restore the original Windows install on an EEE 900A (mine came win Xandros, long since replaced first by Easy Peasy then by Ubuntu NetBook Remix).

As for my wife: various upgrades may be in her future too.

Posted at 09:34 EST | Comments

Thursday, 21 Jan 2010

Content-Disposition

Yesterday, I collaborated with Joshua Peek on improving the parsing of the Content-Disposition header in Rack.  Content-Disposition is used on file upload scenarios.

The previous state was that rack used a simplistic regular expression that didn’t match either the RFC or what browsers actually sent.  What the new code does is first try to strictly follow RFC 2183.  When that fails, it tries to follow what browsers actually do.  And in this case, what browsers actually do is slap quotes around the file name, independent of whether the file name contains backslashes or quotes.  A notable exception to this is recent versions of Chrome.

Posted at 11:02 EST | Comments

Friday, 15 Jan 2010

Peg svn revisions

Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato: You need only append an at sign to the end of the path, such as news@11@

But only for versions of svn >= 1.5.  Very annoying.  Especially if you have a script that works for everything you throw at it, until it comes across a file with name containing an ‘@’.  So you dutifully add the ‘@’ as others have done, find that the code passes all of your tests and then fails on a co-worker’s machine who is running a different version of svn.

Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato: You need only append an at sign to the end of the path, such as news@11@.

But only for versions of svn >= 1.5.  Very annoying.  Especially if you have a script that works for everything you throw at it, until it comes across a file with name containing an ‘@’.  So you dutifully add the ‘@’ as others have done, find that the code passes all of your tests and then fails on a co-worker’s machine who is running a different version of svn.

Code to determine what to append to a given name for use in svn commands (including, BTW, proplist, propget, propset,...):

def svn_at name
  if (`svn --version --quiet`.chomp.split('.') <=> %w(1 5)) < 1
    ''
  elsif name.include? '@'
    '@'
  else
    ''
  end
end

My two cents: information on the basic syntax of working copy (WC) paths as used by the command line should not be buried in a chapter named Advanced Topics in a section entitled Peg and Operative Revisions.

Posted at 09:31 EST | Comments

Thursday, 24 Dec 2009

REST in Raleigh

Darrel Miller: Was the idea to call the REST workshop WS-REST designed to be as inflammatory as possible? http://www.ws-rest.org [via Don Box]

Oh, cool, a conference with a topic I’m interested in in my back yard!

It’s a shame it is too late to submit a talk proposal.  Guess I’ll get to enjoy it as a civilian.

Posted at 05:52 EST | Comments

Essays

Noun vs Verb

Topology

Evolution of the Weblog APIs

Cohesion

SOAP by Example

A Gentle Introduction to Namespaces

Really Simple Syndication

Expect More

REST + SOAP

Beyond Backlinks

Google's Genius

Neuro Transmitters

Headers and Hrefs

A Gentle Introduction to SOAP

Coping with Change

Manufactured Serendipity

Dealing with Diversity

A Busy Developers Guide to WSDL 1.1

Axis/Radio Interop, Actual and Potential

To Infinity and Beyond: the Quest for SOAP Interoperability

What Object Does SOAP Access?

Favorites

In Praise of Evolvable Systems

Metacrap

The Law of Leaky Abstractions

The Eight Fallacies of Distributed Computing

Permanet, Nearlynet, and Wireless Data

Warnock's Dilemma

Sunir's corollaries

Laws of Explanation

Search

  • About
  • Twitter
  • Comments
  • Register
  • Statistics
  • Archives
  • Planet
  • Code
  • Rails
  • RESTful
  • Disclaimer
  • Blogroll

    0xdecafbad
    aaron swartz
    adam bosworth
    apophenia
    ascription is an anathema...
    better living through software
    bitworking stories
    blogging roller
    burningbird
    clemens vasters
    code feed
    d2r
    dare obasanjo
    dave orchard
    dave seidel
    dive into mark
    dj
    don box
    don park
    erik hatcher
    flashgoirl
    formerly echo
    freeform goodness
    gary burd
    glen daniels
    graham glass
    greg reinacker
    home is where the...
    ikvm.net
    inessential.com
    ingo rammer
    inspirational technology
    joel on software
    john.beimler
    joi ito
    jon udell
    ken
    ken macleod
    lambda the ultimate
    loosely coupled
    luke hutteman
    making it stick
    many-to-many
    mark baker
    mitch kapor
    mnot
    musings
    nelson
    ongoing
    pet rock star
    phil ringnalda dot com
    raelity bytes
    ray ozzie
    rebecca dias
    robert c. martin
    sam gentile
    sean mcgrath
    seb
    sellsbrothers.com
    sifry
    silent-penguin.com
    simon fell
    simon willison
    simplegeek
    sjoerd visscher
    snellspace
    squawks of the parrot
    stefano
    sterling hughes'
    ted leung on the...
    the .net guy
    the 80/20 solution
    thinking about computing
    verba volant
    webmink
    www.davidwatson
    xml eye for the...

    Powered by

    Apache
    blo.gs
    blosxom
    Tidy
    Vim
    XHTML 1.0