<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Beckshome.com: Thomas Beck's Blog</title>
    <link>http://www.beckshome.com/</link>
    <description>Musings about technology and things tangentially related</description>
    <image>
      <url>http://www.beckshome.com/images/ChannelImage.gif</url>
      <title>Beckshome.com: Thomas Beck's Blog</title>
      <link>http://www.beckshome.com/</link>
    </image>
    <language>en-us</language>
    <copyright>Thomas Beck</copyright>
    <lastBuildDate>Mon, 17 Mar 2008 04:12:06 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>thomas@beckshome.com</managingEditor>
    <webMaster>thomas@beckshome.com</webMaster>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=a9536e43-897e-4e53-9415-0700b9c55f9a</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,a9536e43-897e-4e53-9415-0700b9c55f9a.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,a9536e43-897e-4e53-9415-0700b9c55f9a.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a9536e43-897e-4e53-9415-0700b9c55f9a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I had to really lay into this movie in
my Amazon.com review. I tend to write reviews for products that I'm impressed with
and just keep quite on products that don't really impress. This movie, however, was
the exception. It got such good reviews on Amazon that I felt compelled to give it
a look. The Internet Movie Database (IMDB) <a href="http://www.imdb.com/title/tt0937347/">had
some of the best information</a> on this flick outside of Amazon. It didn't make the
mainstream movie reviews sites like <a href="http://www.rottentomatoes.com/">Rottentomatoes.com</a> since
it never made it to the box office. 2 starts was probably a bit harsh, 2.5 would have
been more appropriate. I felt the genuine need to remove this movie from the 5 star
plateau though as this is genuinely deceitful. <a href="http://www.amazon.com/Already-Dead-Til-Schweiger/dp/B000YDOOGE/">My
Amazon review</a> follows:<br /><br /><img src="http://www.beckshome.com/content/binary/Already_Dead.jpg" border="0" /><br /><i><br />
I really live or die by Amazon reviews. 99% of the time, they are spot on. I felt
like I was burned a bit by the reviews on this one. 
<br /><br />
I should have been a bit suspicious when a movie that never even made it to the box
office (mainstream, independent, or otherwise) was holding down a 5 star rating on
Amazon. Some of the sites that I normally rely on for movie ratings didn't even cover
this movie since it didn't get a lot of press and didn't get any reviews by national
or regional critics. 
<br /><br />
The majority of reviews that I read seemed held back on information so as not to give
the "plot turns" away. Let me lay it out for you, there are no real plot turns so
don't hold your breath waiting for any. Once you get past the opening scenes and understand
the premise of the film, it quickly degrades into a typical Hollywood action / adventure
type flick. That said, this is no worse than a lot of the trash that Hollywood releases
to fill the theaters during the peak summer movie months. In some cases (pick most
any action film on installment 3 or greater), it's actually better. 
<br /><br />
"Already Dead" is a 2-3 star movie that might be worth the low price you pay for the
rental at Unboxed or your local retail outlet. Don't go in expecting too much though.
There's a reason this didn't get picked up for mainstream distribution.</i><br /><img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=a9536e43-897e-4e53-9415-0700b9c55f9a" /></body>
      <title>Already Dead</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,a9536e43-897e-4e53-9415-0700b9c55f9a.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,a9536e43-897e-4e53-9415-0700b9c55f9a.aspx</link>
      <pubDate>Mon, 17 Mar 2008 04:12:06 GMT</pubDate>
      <description>I had to really lay into this movie in my Amazon.com review. I tend to write reviews for products that I'm impressed with and just keep quite on products that don't really impress. This movie, however, was the exception. It got such good reviews on Amazon that I felt compelled to give it a look. The Internet Movie Database (IMDB) &lt;a href="http://www.imdb.com/title/tt0937347/"&gt;had
some of the best information&lt;/a&gt; on this flick outside of Amazon. It didn't make the
mainstream movie reviews sites like &lt;a href="http://www.rottentomatoes.com/"&gt;Rottentomatoes.com&lt;/a&gt; since
it never made it to the box office. 2 starts was probably a bit harsh, 2.5 would have
been more appropriate. I felt the genuine need to remove this movie from the 5 star
plateau though as this is genuinely deceitful. &lt;a href="http://www.amazon.com/Already-Dead-Til-Schweiger/dp/B000YDOOGE/"&gt;My
Amazon review&lt;/a&gt; follows:&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.beckshome.com/content/binary/Already_Dead.jpg" border="0"&gt;
&lt;br&gt;
&lt;i&gt;
&lt;br&gt;
I really live or die by Amazon reviews. 99% of the time, they are spot on. I felt
like I was burned a bit by the reviews on this one. 
&lt;br&gt;
&lt;br&gt;
I should have been a bit suspicious when a movie that never even made it to the box
office (mainstream, independent, or otherwise) was holding down a 5 star rating on
Amazon. Some of the sites that I normally rely on for movie ratings didn't even cover
this movie since it didn't get a lot of press and didn't get any reviews by national
or regional critics. 
&lt;br&gt;
&lt;br&gt;
The majority of reviews that I read seemed held back on information so as not to give
the "plot turns" away. Let me lay it out for you, there are no real plot turns so
don't hold your breath waiting for any. Once you get past the opening scenes and understand
the premise of the film, it quickly degrades into a typical Hollywood action / adventure
type flick. That said, this is no worse than a lot of the trash that Hollywood releases
to fill the theaters during the peak summer movie months. In some cases (pick most
any action film on installment 3 or greater), it's actually better. 
&lt;br&gt;
&lt;br&gt;
"Already Dead" is a 2-3 star movie that might be worth the low price you pay for the
rental at Unboxed or your local retail outlet. Don't go in expecting too much though.
There's a reason this didn't get picked up for mainstream distribution.&lt;/i&gt; 
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=a9536e43-897e-4e53-9415-0700b9c55f9a" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,a9536e43-897e-4e53-9415-0700b9c55f9a.aspx</comments>
      <category>Product Reviews</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=d9e11f46-7940-4374-adab-4daf5e92b5b0</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,d9e11f46-7940-4374-adab-4daf5e92b5b0.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,d9e11f46-7940-4374-adab-4daf5e92b5b0.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d9e11f46-7940-4374-adab-4daf5e92b5b0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Having non-static machine keys when hosting
on IIS is just one of those things that's just bound to cause trouble eventually.
This holds true equally for single server hosting environments and load balanced web
farm environments. Especially if your goal is to shield your users from any knowledge
of IIS lifecycle activities (e.g. application pool recycles), the use of static machine
keys is to be strongly recommended. The implications of static versus dynamic keys
are enumerated for several different hosting situations below:<br /><br /><img src="http://www.beckshome.com/content/binary/machine_keys.jpg" border="0" /><br /><ul><li><b>Single Machine - </b>Most of the recommendations around machine keys involve synchronizing
machine keys across multiple machines. There is, however, value in setting static
machine keys for a single machine, single worker process environment. Quite simply,
if machine keys are not static, the generation of a dynamic machine key for an IIS
reboot or application pool recycle will cause any machine key related elements (e.g.
view state) rendered before the event to be invalid. This will likely result in exceptions
that will impact normal user processing.</li></ul><ul><li><span style="font-weight: bold;">Single Machine / Web Garden</span> - The introduction
of the Web Garden option to IIS can be viewed as the "poor man's load balancing".
This option provides for a simple round robin routing across multiple worker processes,
usually with each process owing affinity to a particular processor. Due to the simple
load balancing approach taken, there is no option for web gardens but to synchronize
machine keys. This is of course, unless you've managed to make your application completely
stateless, in which case (congratulations) none of this advice applies to you.</li></ul><ul><li><span style="font-weight: bold;">Multiple Machines / Web Farms</span> - The applicability
of static machine keys to a web farm environment applies, theoretically, only to web
gardens in which the load balancing approach does not guarantee server affinity. Once
again, to avoid impacting user processing during load balance machine failover or
due to recycles or reboots, I'd always recommend using static machine keys. Even when
these areas are not concerns, I've found other troubles just seem to arise when you
can't guarantee static machine keys across machines. For web events regarding cryptographic
exceptions or viewstate verification issues, I've found it best to start troubleshooting
with synchronizing machine keys and then working down from there.</li></ul>
The definitive guide to configuring machine keys in ASP.NET 2.0, including .NET code
for generating the keys, can be found <a title="here" href="http://msdn2.microsoft.com/en-us/library/ms998288.aspx" id="rog7">here</a>.
Microsoft has never revisited <a title="their ruling" href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105039" id="rtyn">their
ruling</a> that machine key issues can arise outside of web farms. Once again, if
you're observing cryptographic or viewstate errors, I'd advise that you start with
static machine keys. If compiling and running Microsoft's code to generate a machine
key is asking too much, <a title="this online program" href="http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx" id="b7ou">this
online program</a> will generate a key for you.<br /><br />
Finally, I've been asked a couple of times about the downsides of sharing static machine
keys across machines. This depends upon what you use the machine key for. In most
cases, I wouldn't advise that you use the machine key for anything more than viewstate
encoding. In this case, a machine key compromise will mean that someone can theoretically
hack your viewstate. If they got your machine key, it also means that they have access
to your web.config file, in which case you usually have bigger concerns than viewstate
hacking.<img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=d9e11f46-7940-4374-adab-4daf5e92b5b0" /></body>
      <title>The Virtue Of Static IIS Machine Keys</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,d9e11f46-7940-4374-adab-4daf5e92b5b0.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,d9e11f46-7940-4374-adab-4daf5e92b5b0.aspx</link>
      <pubDate>Mon, 17 Mar 2008 03:31:52 GMT</pubDate>
      <description>Having non-static machine keys when hosting on IIS is just one of those
things that's just bound to cause trouble eventually. This holds true
equally for single server hosting environments and load balanced web
farm environments. Especially if your goal is to shield your users
from any knowledge of IIS lifecycle activities (e.g. application pool
recycles), the use of static machine keys is to be strongly
recommended. The implications of static versus dynamic keys are
enumerated for several different hosting situations below:&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.beckshome.com/content/binary/machine_keys.jpg" border="0"&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Single Machine - &lt;/b&gt;Most of the recommendations around machine keys involve synchronizing
machine keys across multiple machines. There is, however, value in setting static
machine keys for a single machine, single worker process environment. Quite simply,
if machine keys are not static, the generation of a dynamic machine key for an IIS
reboot or application pool recycle will cause any machine key related elements (e.g.
view state) rendered before the event to be invalid. This will likely result in exceptions
that will impact normal user processing.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;span style="font-weight: bold;"&gt;Single Machine / Web Garden&lt;/span&gt; - The introduction
of the Web Garden option to IIS can be viewed as the "poor man's load balancing".
This option provides for a simple round robin routing across multiple worker processes,
usually with each process owing affinity to a particular processor. Due to the simple
load balancing approach taken, there is no option for web gardens but to synchronize
machine keys. This is of course, unless you've managed to make your application completely
stateless, in which case (congratulations) none of this advice applies to you.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;span style="font-weight: bold;"&gt;Multiple Machines / Web Farms&lt;/span&gt; - The applicability
of static machine keys to a web farm environment applies, theoretically, only to web
gardens in which the load balancing approach does not guarantee server affinity. Once
again, to avoid impacting user processing during load balance machine failover or
due to recycles or reboots, I'd always recommend using static machine keys. Even when
these areas are not concerns, I've found other troubles just seem to arise when you
can't guarantee static machine keys across machines. For web events regarding cryptographic
exceptions or viewstate verification issues, I've found it best to start troubleshooting
with synchronizing machine keys and then working down from there.&lt;/li&gt;
&lt;/ul&gt;
The definitive guide to configuring machine keys in ASP.NET 2.0, including .NET code
for generating the keys, can be found &lt;a title="here" href="http://msdn2.microsoft.com/en-us/library/ms998288.aspx" id="rog7"&gt;here&lt;/a&gt;.
Microsoft has never revisited &lt;a title="their ruling" href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105039" id="rtyn"&gt;their
ruling&lt;/a&gt; that machine key issues can arise outside of web farms. Once again, if
you're observing cryptographic or viewstate errors, I'd advise that you start with
static machine keys. If compiling and running Microsoft's code to generate a machine
key is asking too much, &lt;a title="this online program" href="http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx" id="b7ou"&gt;this
online program&lt;/a&gt; will generate a key for you.&lt;br&gt;
&lt;br&gt;
Finally, I've been asked a couple of times about the downsides of sharing static machine
keys across machines. This depends upon what you use the machine key for. In most
cases, I wouldn't advise that you use the machine key for anything more than viewstate
encoding. In this case, a machine key compromise will mean that someone can theoretically
hack your viewstate. If they got your machine key, it also means that they have access
to your web.config file, in which case you usually have bigger concerns than viewstate
hacking.&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=d9e11f46-7940-4374-adab-4daf5e92b5b0" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,d9e11f46-7940-4374-adab-4daf5e92b5b0.aspx</comments>
      <category>Java - .NET - RoR</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=1d6044b4-1b4d-460d-8f15-aae00df713b0</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,1d6044b4-1b4d-460d-8f15-aae00df713b0.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,1d6044b4-1b4d-460d-8f15-aae00df713b0.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1d6044b4-1b4d-460d-8f15-aae00df713b0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been contemplating the move towards
a self-hosted Subversion repository for quite a while. My earlier attempts worked
but left me with a lot of inconvenient and sometimes quirky side effects. These experiences
always led me back to hosting Subversion on Linux, which is really where it works
most naturally. Recently, however, I decided to retry my luck with Subversion hosting
on Windows and I made the call to go with a "package" instead of doing the Apache
/ Subversion integration myself.<br /><br /><img src="http://www.beckshome.com/content/binary/VisualSVN.png" border="0" /><br /><br />
The tool that I went with, <a href="http://www.visualsvn.com/">VisualSVN</a>, is a
Windows version of Subversion that targets primarily Microsoft developers using VisualStudio
as their development platform. Matter of fact, the Subversion server package is freely
distributed and the actual product that is sold is the Visual Studio plugin that allows
you to tap into Subversion from Visual Studio. With a 30 day trial period and $49
price tag, I decided that it couldn't hurt to try it out. My findings are below:<br /><ul><li><b>VisualSVN Server </b>- The VisualSVN server, as mentioned earlier is a freely distributed
product. You can get this piece of software whether or not you ultimately decide to
buy and use the Subversion Visual Studio plugin. The server runs exclusively over
HTTP / HTTPS (using OpenSSL) and does not support Subversion's binary protocol or
running Subversion over SSH. Obviously, this means that Apache is in play. A version
of Apache is included in the distribution. Initial configuration of the server is
very easy, the setup instructions describe the extent of it. As I <a href="http://www.beckshome.com/PermaLink,guid,a5dd9f2a-378d-49ec-bd5d-e05b840440d7.aspx">blogged
about previously</a>, this changes a bit if you try to get Apache and IIS to run side-by-side.
In this case, you need to be very explicit and tell the very greedy IIS to stop listening
on other IP addresses so that port 80 can be shared by IIS and Apache. I included
links to the Microsoft article <a href="http://www.beckshome.com/PermaLink,guid,a5dd9f2a-378d-49ec-bd5d-e05b840440d7.aspx">in
my earlier post</a>. In this case, you'll want to use <font face="Courier New">httpcfg
delete iplisten -i xxx.xxx.xxx.xxx </font>to stop IIS from listening on the port Apache
is running on.       
<br /></li></ul><div style="margin-left: 40px;">The folks who designed VisualSVN added some cool management
functionality that shields the administrator from lower level Subversion commands.
Implemented as a Windows MMC snap-in, Subversion repository administration be performed
right alongside other server management tasks. The MMC enables one step creation of
repositories (with or without the standard Subversion folder structure), creation
of users and groups, and assignment of user privileges to repository actions.<br /></div><ul><li><b>VisualSVN Visual Studio Plugin - </b>As useful as the server is, the real product
is the VisualStudio plugin. The most recent version of this plugin works on VisualStudio
2008 so I thought I'd install it and give it a whirl. Installation is fairly easy.
Both TortoiseSVN and the VisualSVN plugin must be installed. I don't know exactly
how VisualSVN communicates with Tortoise but it seems to make sense to leverage an
existing Windows Subversion library rather than building everything from scratch.
Using both the plugin and Tortoise gives you two ways to work with Subversion. In
my experience with other Java IDE plugins (Netbeans and Elcipse), this is sometimes
necessary to get around the shortcomings of the browser plugin.</li></ul><div style="margin-left: 40px;">Adding a project to VisualSVN using the plugin is,
as it well should be, a relatively easy task. VisualSVN has some intelligence built
in above and beyond the basicTortoiseSVN libraries. In my case, the plugin didn't
add my Visual Studio settings, binaries, or a bunch of MP3 and JPEG photos that represent
content and really didn't belong under source control. Other than that, a lot of the
processing is just handed over to TortoiseSVN. The SVN UI presented by the plugin
should all be pretty familiar to you if you've ever used TortoiseSVN before.<br /><br /></div>
This looks to be my keeper for Subversion hosting. Now I need to port over my existing
repositories into the VisualSVN server.<img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=1d6044b4-1b4d-460d-8f15-aae00df713b0" /></body>
      <title>VisualSVN</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,1d6044b4-1b4d-460d-8f15-aae00df713b0.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,1d6044b4-1b4d-460d-8f15-aae00df713b0.aspx</link>
      <pubDate>Tue, 11 Mar 2008 03:37:01 GMT</pubDate>
      <description>I've been contemplating the move towards a self-hosted Subversion
repository for quite a while. My earlier attempts worked but left me
with a lot of inconvenient and sometimes quirky side effects. These
experiences always led me back to hosting Subversion on Linux, which is
really where it works most naturally. Recently, however, I decided to
retry my luck with Subversion hosting on Windows and I made the call to
go with a "package" instead of doing the Apache / Subversion
integration myself.&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.beckshome.com/content/binary/VisualSVN.png" border="0"&gt;
&lt;br&gt;
&lt;br&gt;
The tool that I went with, &lt;a href="http://www.visualsvn.com/"&gt;VisualSVN&lt;/a&gt;, is a
Windows version of Subversion that targets primarily Microsoft developers using VisualStudio
as their development platform. Matter of fact, the Subversion server package is freely
distributed and the actual product that is sold is the Visual Studio plugin that allows
you to tap into Subversion from Visual Studio. With a 30 day trial period and $49
price tag, I decided that it couldn't hurt to try it out. My findings are below:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;VisualSVN Server &lt;/b&gt;- The VisualSVN server, as mentioned earlier is a freely distributed
product. You can get this piece of software whether or not you ultimately decide to
buy and use the Subversion Visual Studio plugin. The server runs exclusively over
HTTP / HTTPS (using OpenSSL) and does not support Subversion's binary protocol or
running Subversion over SSH. Obviously, this means that Apache is in play. A version
of Apache is included in the distribution. Initial configuration of the server is
very easy, the setup instructions describe the extent of it. As I &lt;a href="http://www.beckshome.com/PermaLink,guid,a5dd9f2a-378d-49ec-bd5d-e05b840440d7.aspx"&gt;blogged
about previously&lt;/a&gt;, this changes a bit if you try to get Apache and IIS to run side-by-side.
In this case, you need to be very explicit and tell the very greedy IIS to stop listening
on other IP addresses so that port 80 can be shared by IIS and Apache. I included
links to the Microsoft article &lt;a href="http://www.beckshome.com/PermaLink,guid,a5dd9f2a-378d-49ec-bd5d-e05b840440d7.aspx"&gt;in
my earlier post&lt;/a&gt;. In this case, you'll want to use &lt;font face="Courier New"&gt;httpcfg
delete iplisten -i xxx.xxx.xxx.xxx &lt;/font&gt;to stop IIS from listening on the port Apache
is running on.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-left: 40px;"&gt;The folks who designed VisualSVN added some cool management
functionality that shields the administrator from lower level Subversion commands.
Implemented as a Windows MMC snap-in, Subversion repository administration be performed
right alongside other server management tasks. The MMC enables one step creation of
repositories (with or without the standard Subversion folder structure), creation
of users and groups, and assignment of user privileges to repository actions.&lt;br&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;VisualSVN Visual Studio Plugin - &lt;/b&gt;As useful as the server is, the real product
is the VisualStudio plugin. The most recent version of this plugin works on VisualStudio
2008 so I thought I'd install it and give it a whirl. Installation is fairly easy.
Both TortoiseSVN and the VisualSVN plugin must be installed. I don't know exactly
how VisualSVN communicates with Tortoise but it seems to make sense to leverage an
existing Windows Subversion library rather than building everything from scratch.
Using both the plugin and Tortoise gives you two ways to work with Subversion. In
my experience with other Java IDE plugins (Netbeans and Elcipse), this is sometimes
necessary to get around the shortcomings of the browser plugin.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin-left: 40px;"&gt;Adding a project to VisualSVN using the plugin is,
as it well should be, a relatively easy task. VisualSVN has some intelligence built
in above and beyond the basicTortoiseSVN libraries. In my case, the plugin didn't
add my Visual Studio settings, binaries, or a bunch of MP3 and JPEG photos that represent
content and really didn't belong under source control. Other than that, a lot of the
processing is just handed over to TortoiseSVN. The SVN UI presented by the plugin
should all be pretty familiar to you if you've ever used TortoiseSVN before.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;
This looks to be my keeper for Subversion hosting. Now I need to port over my existing
repositories into the VisualSVN server.&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=1d6044b4-1b4d-460d-8f15-aae00df713b0" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,1d6044b4-1b4d-460d-8f15-aae00df713b0.aspx</comments>
      <category>General Technology;Java - .NET - RoR;Product Reviews</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=90f9bbcc-021d-455a-972e-bfa854b4fe9e</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,90f9bbcc-021d-455a-972e-bfa854b4fe9e.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,90f9bbcc-021d-455a-972e-bfa854b4fe9e.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=90f9bbcc-021d-455a-972e-bfa854b4fe9e</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been busy since returning from vacation
on getting my new iMac up and running. Aside from the machine being a physical work
of art, it's also been performing very well and runs so silent that I'm hearing all
kinds of new noises in my house that I wasn't aware of before. This doesn't mean that
I've completely forsaken Windows. In fact, the move to the Mac has allowed me to finally
move to Vista on my home machine and install Visual Studio 2008, which is killing
my work laptop. For those of you remotely familiar with the Mac, running Windows side-by-side
with OS X has been possible since the release of the Intel-based Macs. This started
with <a title="Boot Camp" href="http://www.apple.com/macosx/features/bootcamp.html" id="nnts">Boot
Camp</a> and gained serious traction with the release of <a title="Parallels" href="http://www.parallels.com/" id="ah68">Parallels</a>.
Most recently, VMware jumped into this space with their <a title="Fusion" href="http://www.vmware.com/products/fusion/" id="wrp8">Fusion</a> product
for the Mac. I went with Fusion due to reviews on both Apple's site and Amazon.com
that seemed to indicate that Fusion was more stable and that there were far more converts
from Parallels to Fusion than in the opposite direction.<br /><blockquote><div align="left"><img src="content/binary/VMWare%20Fusion.jpg" border="0" /><br /></div></blockquote>I'm running 3 operating systems now on this machine, 2 of them under
Fusion 1.1. Mac OS X Leopard came pre-installed with the machine and Vista and Ubuntu
Linux are running under Fusion. Despite the 64-bit Intel architecture on the new Macs,
both the Vista and Ubuntu installs are 32-bit. I didn't hear enough good news about
the 64 bit releases to convince me that they were worth pursuing. All of this is running
on 4GB of memory. Only 1 GB was stock and you'd be crazy to pay Apple's prices for
memory. <a title="Other World Computing (OWC)" href="http://eshop.macsales.com/" id="su21">Other
World Computing (OWC)</a> will get you to the 4GB maximum for less than $100. The
memory install took all of about 10 minutes and OWC's service and delivery were nothing
short of outstanding.<br /><br />
As far as the individual operating systems, they are all running fine. That said,
everyone puts different kinds of stresses on their machines. Mine is software development
and I require each of my operating systems to run at least oneIDE. That's actually
the reason for the existence of these VMs in the first place. Although my initial
research prepared me for the worst, I've had no issues with running IDEs concurrently
on all 3 operating systems. I've encountered some small quirks, which I've documented
below for anyone who might find this sort of thing useful:<br /><br /><ul><li><b>Mac OS X Leopard - </b>I'm running NetBeans 6.0 with the Ruby-only configuration.
Much to the chagrin of many Mac developers, Leopard did not ship with Java 6 even
though it was included in some of thepre-releases. This proved to be a non-issue for
the installation of the latest version of NetBeans. Obviously, running NetBeans in
Ruby-only mode means that I'm not exercising the JDK and thus avoiding what could
potentially be a lot of issues. 
</li><li><b>Windows </b><b>Vista - </b>Although I've had issues getting used to the Vista operating
system from the Windows 2003 Server / Windows XP I've become so familiar with, I've
had few issues actually running Vista. I'm running Vista with the 1 GB RAM that Fusion
recommended and have had no issues thus far. The only issue I encountered was trying
to install Vista in Fusion Easy Install mode with multipleCDs , as opposed to a DVD.
This is a documented issue with Fusion that I didn't become aware of until I ran into
it head-on. Simply switching to a normal install solved all of my issues. On top of
Vista, I'm running Visual Studio 2008. This runs pretty quick - even on 1 GB and builds
of moderately sized solutions are pretty fast. TheIDE is really responsive and you
really only notice that your running in a virtualized environment if you try to resize
the entire Vista window to get more real estate for the IDE. 
</li><li><b>Ubuntu 7.10 </b>- Despite the size of the operating system, this installation took
longer than Vista. I chose not to use one of VMware's canned virtual appliances and
go with a fresh install.  I would probably re-examine this decision if I had
the chance to do it all over again. Ubuntu is running NetBeans 6.0 with the full Java
EE stack. The install of NetBeans downloaded directly from netbeans.com went really
well once the proper Sun JDKs were installed. Both the Java 5 and Java 6 JDKs were
available directly from Ubuntu's installation utility. I installed Java 5 first and,
after realizing that it was a vanilla 1.5.0 release that didn't meet the requirements
for NetBeans 6.0, I installed Java 6. Things have been just dandy since then.</li></ul><img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=90f9bbcc-021d-455a-972e-bfa854b4fe9e" /></body>
      <title>VMware Fusion</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,90f9bbcc-021d-455a-972e-bfa854b4fe9e.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,90f9bbcc-021d-455a-972e-bfa854b4fe9e.aspx</link>
      <pubDate>Mon, 07 Jan 2008 12:18:33 GMT</pubDate>
      <description>I've been busy since returning from vacation on getting my new iMac up
and running. Aside from the machine being a physical work of art, it's
also been performing very well and runs so silent that I'm hearing all
kinds of new noises in my house that I wasn't aware of before. This
doesn't mean that I've completely forsaken Windows. In fact, the move
to the Mac has allowed me to finally move to Vista on my home machine
and install Visual Studio 2008, which is killing my work laptop. For
those of you remotely familiar with the Mac, running Windows
side-by-side with OS X has been possible since the release of the
Intel-based Macs. This started with &lt;a title="Boot Camp" href="http://www.apple.com/macosx/features/bootcamp.html" id="nnts"&gt;Boot
Camp&lt;/a&gt; and gained serious traction with the release of &lt;a title="Parallels" href="http://www.parallels.com/" id="ah68"&gt;Parallels&lt;/a&gt;.
Most recently, VMware jumped into this space with their &lt;a title="Fusion" href="http://www.vmware.com/products/fusion/" id="wrp8"&gt;Fusion&lt;/a&gt; product
for the Mac. I went with Fusion due to reviews on both Apple's site and Amazon.com
that seemed to indicate that Fusion was more stable and that there were far more converts
from Parallels to Fusion than in the opposite direction.&lt;br&gt;
&lt;blockquote&gt;
&lt;div align="left"&gt;&lt;img src="content/binary/VMWare%20Fusion.jpg" border="0"&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/blockquote&gt;I'm running 3 operating systems now on this machine, 2 of them under
Fusion 1.1. Mac OS X Leopard came pre-installed with the machine and Vista and Ubuntu
Linux are running under Fusion. Despite the 64-bit Intel architecture on the new Macs,
both the Vista and Ubuntu installs are 32-bit. I didn't hear enough good news about
the 64 bit releases to convince me that they were worth pursuing. All of this is running
on 4GB of memory. Only 1 GB was stock and you'd be crazy to pay Apple's prices for
memory. &lt;a title="Other World Computing (OWC)" href="http://eshop.macsales.com/" id="su21"&gt;Other
World Computing (OWC)&lt;/a&gt; will get you to the 4GB maximum for less than $100. The
memory install took all of about 10 minutes and OWC's service and delivery were nothing
short of outstanding.&lt;br&gt;
&lt;br&gt;
As far as the individual operating systems, they are all running fine. That said,
everyone puts different kinds of stresses on their machines. Mine is software development
and I require each of my operating systems to run at least oneIDE. That's actually
the reason for the existence of these VMs in the first place. Although my initial
research prepared me for the worst, I've had no issues with running IDEs concurrently
on all 3 operating systems. I've encountered some small quirks, which I've documented
below for anyone who might find this sort of thing useful:&lt;br&gt;
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Mac OS X Leopard - &lt;/b&gt;I'm running NetBeans 6.0 with the Ruby-only configuration.
Much to the chagrin of many Mac developers, Leopard did not ship with Java 6 even
though it was included in some of thepre-releases. This proved to be a non-issue for
the installation of the latest version of NetBeans. Obviously, running NetBeans in
Ruby-only mode means that I'm not exercising the JDK and thus avoiding what could
potentially be a lot of issues. 
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Windows &lt;/b&gt;&lt;b&gt;Vista - &lt;/b&gt;Although I've had issues getting used to the Vista operating
system from the Windows 2003 Server / Windows XP I've become so familiar with, I've
had few issues actually running Vista. I'm running Vista with the 1 GB RAM that Fusion
recommended and have had no issues thus far. The only issue I encountered was trying
to install Vista in Fusion Easy Install mode with multipleCDs , as opposed to a DVD.
This is a documented issue with Fusion that I didn't become aware of until I ran into
it head-on. Simply switching to a normal install solved all of my issues. On top of
Vista, I'm running Visual Studio 2008. This runs pretty quick - even on 1 GB and builds
of moderately sized solutions are pretty fast. TheIDE is really responsive and you
really only notice that your running in a virtualized environment if you try to resize
the entire Vista window to get more real estate for the IDE. 
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Ubuntu 7.10 &lt;/b&gt;- Despite the size of the operating system, this installation took
longer than Vista. I chose not to use one of VMware's canned virtual appliances and
go with a fresh install.&amp;nbsp; I would probably re-examine this decision if I had
the chance to do it all over again. Ubuntu is running NetBeans 6.0 with the full Java
EE stack. The install of NetBeans downloaded directly from netbeans.com went really
well once the proper Sun JDKs were installed. Both the Java 5 and Java 6 JDKs were
available directly from Ubuntu's installation utility. I installed Java 5 first and,
after realizing that it was a vanilla 1.5.0 release that didn't meet the requirements
for NetBeans 6.0, I installed Java 6. Things have been just dandy since then.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=90f9bbcc-021d-455a-972e-bfa854b4fe9e" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,90f9bbcc-021d-455a-972e-bfa854b4fe9e.aspx</comments>
      <category>General Technology;Mac;Product Reviews</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=0deca434-657d-4137-a4fc-a8411a05f545</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,0deca434-657d-4137-a4fc-a8411a05f545.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,0deca434-657d-4137-a4fc-a8411a05f545.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0deca434-657d-4137-a4fc-a8411a05f545</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">After a long hiatus, I just got done working
my way through a 6 month photo backlog, arranging and backing up photos and picking
the best ones out for uploading to Flickr. You can find the new photos in the <a href="http://www.beckshome.com/Format.aspx?=photos">photo
section</a> of my blog. I was working my way through videos as well and preparing
to convert some of these to Flash for uploading. If you look at the videos section
of my blog, you'll notice that there are <a href="http://www.beckshome.com/Format.aspx?=videos">no
new videos</a>. So what happened?<br /><br />
Although I'm really happy with <a href="http://www.beckshome.com/PermaLink,guid,ec030a92-5067-4bc3-be78-d8c2954e1262.aspx">On2
Technologies Flash encoding software</a>, the process of importing and transcoding
video is time consuming and CPU intensive. Then there's the entire upload and markup
creation process, which is a royal pain that I should have long since automated away
- but I haven't. What I'd really like is a process similar to the one that I have
with Flickr: I upload photos using a OS-specific program (uploadr) and they just appear
on my blog. I've known that this process needs to be replaced for a while, I've just
been hesitant to pull the trigger. Enter Smugmug...<br /><br />
Smugmug, the family owned photo service that leans heavily on <a href="http://www.amazon.com/gp/browse.html?node=16427261">Amazon's
S3 service</a> for file storage, announced last week a significant upgrade to their
video hosting capabilities by supporting the H.264 video format. Right now, Apple's
QuickTime plugin provides the best support for H.264 but Adobe's newest version of
Flash will also be supporting H.264. If Microsoft wants to remain competitive with
Silverlight, they'll be following suit as well. So what does this mean? This means
that Smugmug will automatically transcode your uploaded video. Depending upon your
membership level, video can be encoded at DVD resolution (960x540, for power users)
or HD (1280x720, for pro users). You upload it and Smugmug transcodes and hosts it,
providing unlimited bandwidth and storage space. Since seeing is believing, click
on the image below to see a sample SmugMug Thanksgiving video and tell me you wouldn't
like to have online video of this quality.<br /><br /><a href="http://cmac.smugmug.com/gallery/3874615#224527632-A-LB" target="_blank"><img src="http://www.beckshome.com/content/binary/smugmug-video.jpg" border="0" /></a><br /><br />
If you're going video, you've got to go big and at $150/year, Smugmug carries with
it a fairly large price tag. However, when I factor in that I can cancel my Flickr
subscription, stop upgrading my Flash encoder, decrease my bandwidth utilization on
my hosting service, and have a hassle free upload and transcode experience... in HD,
I'm sold. As an added bonus, Smugmug has just added an adaptive imaging sizing capability
they call "SmugMungous" that automatically selects the right size picture for your
screen. To get the full effect, this needs to be tried on a fairly large monitor.
And by the way, you can point to your smugmug gallery using a custom domain or sub-domain
and you can share video updates as an iTunes Podcast that friends and family can subscribe
to.<br /><br />
SmugMug is just one more piece in my grand attempt to upgrade my life to HD. We went
with HD TV almost 3 years ago now and it's hard looking at a normal signal now, especially
on a large 16:9 screen. I'm strongly considering Smugmug for its HD capabilities but
this is going to cause me to reexamine two other areas of my life that need HD upgrading:
my HD recording capability and HD playback capability. I'm waiting for Santa Claus
to drop an HD TiVo down the chimney. The $1000 dollar price tag for the original Series3
TiVo was a pill I couldn't bring myself to swallow, no matter how much I love TiVo.
AT $300 and almost all of the features of the Series3, the <a href="http://www.amazon.com/TiVo-TCD652160-Digital-Video-Recorder/dp/B000RZDBM2/">HD
TiVo</a> got my attention. I'm also looking at an HD camcorder, an essential item
if I'm serious about the Smugmug thing.<br /><br />
That's a lot of upgrading to do. Still, there are several areas that I'm not upgrading.
I'm waiting for the Blu-ray / HD DVD war to show some signs of abating but this is
definitely a medium worth revisiting in 2008. HD Radio - now I just don't get this
one!<br /><img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=0deca434-657d-4137-a4fc-a8411a05f545" /></body>
      <title>Life in HD</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,0deca434-657d-4137-a4fc-a8411a05f545.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,0deca434-657d-4137-a4fc-a8411a05f545.aspx</link>
      <pubDate>Thu, 20 Dec 2007 04:10:00 GMT</pubDate>
      <description>After a long hiatus, I just got done working my way through a 6 month
photo backlog, arranging and backing up photos and picking the best
ones out for uploading to Flickr. You can find the new photos in the
&lt;a href="http://www.beckshome.com/Format.aspx?=photos"&gt;photo
section&lt;/a&gt; of my blog. I was working my way through videos as well and preparing
to convert some of these to Flash for uploading. If you look at the videos section
of my blog, you'll notice that there are &lt;a href="http://www.beckshome.com/Format.aspx?=videos"&gt;no
new videos&lt;/a&gt;. So what happened?&lt;br&gt;
&lt;br&gt;
Although I'm really happy with &lt;a href="http://www.beckshome.com/PermaLink,guid,ec030a92-5067-4bc3-be78-d8c2954e1262.aspx"&gt;On2
Technologies Flash encoding software&lt;/a&gt;, the process of importing and transcoding
video is time consuming and CPU intensive. Then there's the entire upload and markup
creation process, which is a royal pain that I should have long since automated away
- but I haven't. What I'd really like is a process similar to the one that I have
with Flickr: I upload photos using a OS-specific program (uploadr) and they just appear
on my blog. I've known that this process needs to be replaced for a while, I've just
been hesitant to pull the trigger. Enter Smugmug...&lt;br&gt;
&lt;br&gt;
Smugmug, the family owned photo service that leans heavily on &lt;a href="http://www.amazon.com/gp/browse.html?node=16427261"&gt;Amazon's
S3 service&lt;/a&gt; for file storage, announced last week a significant upgrade to their
video hosting capabilities by supporting the H.264 video format. Right now, Apple's
QuickTime plugin provides the best support for H.264 but Adobe's newest version of
Flash will also be supporting H.264. If Microsoft wants to remain competitive with
Silverlight, they'll be following suit as well. So what does this mean? This means
that Smugmug will automatically transcode your uploaded video. Depending upon your
membership level, video can be encoded at DVD resolution (960x540, for power users)
or HD (1280x720, for pro users). You upload it and Smugmug transcodes and hosts it,
providing unlimited bandwidth and storage space. Since seeing is believing, click
on the image below to see a sample SmugMug Thanksgiving video and tell me you wouldn't
like to have online video of this quality.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://cmac.smugmug.com/gallery/3874615#224527632-A-LB" target="_blank"&gt;&lt;img src="http://www.beckshome.com/content/binary/smugmug-video.jpg" border="0"&gt;&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
If you're going video, you've got to go big and at $150/year, Smugmug carries with
it a fairly large price tag. However, when I factor in that I can cancel my Flickr
subscription, stop upgrading my Flash encoder, decrease my bandwidth utilization on
my hosting service, and have a hassle free upload and transcode experience... in HD,
I'm sold. As an added bonus, Smugmug has just added an adaptive imaging sizing capability
they call "SmugMungous" that automatically selects the right size picture for your
screen. To get the full effect, this needs to be tried on a fairly large monitor.
And by the way, you can point to your smugmug gallery using a custom domain or sub-domain
and you can share video updates as an iTunes Podcast that friends and family can subscribe
to.&lt;br&gt;
&lt;br&gt;
SmugMug is just one more piece in my grand attempt to upgrade my life to HD. We went
with HD TV almost 3 years ago now and it's hard looking at a normal signal now, especially
on a large 16:9 screen. I'm strongly considering Smugmug for its HD capabilities but
this is going to cause me to reexamine two other areas of my life that need HD upgrading:
my HD recording capability and HD playback capability. I'm waiting for Santa Claus
to drop an HD TiVo down the chimney. The $1000 dollar price tag for the original Series3
TiVo was a pill I couldn't bring myself to swallow, no matter how much I love TiVo.
AT $300 and almost all of the features of the Series3, the &lt;a href="http://www.amazon.com/TiVo-TCD652160-Digital-Video-Recorder/dp/B000RZDBM2/"&gt;HD
TiVo&lt;/a&gt; got my attention. I'm also looking at an HD camcorder, an essential item
if I'm serious about the Smugmug thing.&lt;br&gt;
&lt;br&gt;
That's a lot of upgrading to do. Still, there are several areas that I'm not upgrading.
I'm waiting for the Blu-ray / HD DVD war to show some signs of abating but this is
definitely a medium worth revisiting in 2008. HD Radio - now I just don't get this
one!&lt;br&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=0deca434-657d-4137-a4fc-a8411a05f545" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,0deca434-657d-4137-a4fc-a8411a05f545.aspx</comments>
      <category>General Technology</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=704602af-6f43-4b6e-ae5e-071a63b3fb8d</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,704602af-6f43-4b6e-ae5e-071a63b3fb8d.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,704602af-6f43-4b6e-ae5e-071a63b3fb8d.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=704602af-6f43-4b6e-ae5e-071a63b3fb8d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal">
Another in the installment of Rails on Windows “gotchas”, there are some things to
be wary of when working with the Simple_Captcha plugin in the Windows environment.
In terms of basic background, the <a href="http://expressica.com/2007/03/23/simple_captcha_1_0/">Simple_Captcha
plugin</a> facilitates the integration of <a href="http://en.wikipedia.org/wiki/Captcha">CAPTCHA</a> (Computer
Automated Public Turing test to tell Computers and Humans Apart) image recognition
tests, like the example below, into a Rails application. Facilitates is perhaps not
a strong enough term. The plugin makes CAPTCHA integration dirt simple.
</p>
        <p class="MsoNormal">
          <img src="http://www.beckshome.com/content/binary/CAPTCHA_Example.PNG" border="0" />
          <br />
The Simple_Captcha plugin uses RMagick for generation of the CAPTCHA recognition images,
allowing for various image styles and distortion levels. The CAPTCHA can be integrated
via the controller (this one is dirt simple) or via the model (this one is just silly
simple). You can find out more about these and various other integration options on
the plugin’s page. <span style=""> </span></p>
        <p class="MsoNormal">
If you’re doing Rails development on the Windows platform and are not feeling especially
masochistic, the <strong><span style="font-weight: normal;">rmagick-win32</span></strong> gem,
which is bundled with a copy of the ImageMagick Windows installer, is really the only
way to use RMagick. For a long while, the 1.13.0 rmagick-win32 gem was the standard.
However, this gem is likely to cause you issues and you should really upgrade your
gem to the 1.14.1 gem or greater. These gems are fixed to work with RubyGems 0.9.4,
which is the most recent version of this gem as of this blog post. If you don’t perform
this update, you’re likely to see ImageMagick issues bubble up at runtime. 
</p>
        <p class="MsoNormal">
On Windows, these runtime errors frequently manifest themselves as ‘cur_image’ issues.
Several of these issues have been reported on the plugin’s page. <a href="http://expressica.com/2007/03/23/simple_captcha_1_0/#comment-2610">My
post on 10/6</a> covered fixing these issues by upgrading your RMagick gem. Please
don’t downgrade other gems, as suggested in some other posts; this will only make
your life more miserable in the future.
</p>
        <p class="MsoNormal">
All-in-all, the RMagick Windows gem is an excellent way to make powerful image processing
capabilities available to all, including those unfortunate enough to be stuck on a
Rails on Windows development platform. The plugins built on top of RMagick such as
Simple_Captcha and <a href="http://www.beckshome.com/PermaLink,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx">Attachment_Fu</a> are
incredibly powerful and remain very simple by leveraging RMagick’s capabilities. Just
beware if you’re developing on Windows, a little bit of tweaking and debugging may
be necessary to get these plugins to work as advertised.
</p>
        <img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=704602af-6f43-4b6e-ae5e-071a63b3fb8d" />
      </body>
      <title>Simple_Captcha on Windows</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,704602af-6f43-4b6e-ae5e-071a63b3fb8d.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,704602af-6f43-4b6e-ae5e-071a63b3fb8d.aspx</link>
      <pubDate>Sun, 07 Oct 2007 20:29:01 GMT</pubDate>
      <description>&lt;p class="MsoNormal"&gt;
Another in the installment of Rails on Windows “gotchas”, there are some things to
be wary of when working with the Simple_Captcha plugin in the Windows environment.
In terms of basic background, the &lt;a href="http://expressica.com/2007/03/23/simple_captcha_1_0/"&gt;Simple_Captcha
plugin&lt;/a&gt; facilitates the integration of &lt;a href="http://en.wikipedia.org/wiki/Captcha"&gt;CAPTCHA&lt;/a&gt; (Computer
Automated Public Turing test to tell Computers and Humans Apart) image recognition
tests, like the example below, into a Rails application. Facilitates is perhaps not
a strong enough term. The plugin makes CAPTCHA integration dirt simple.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
&lt;img src="http://www.beckshome.com/content/binary/CAPTCHA_Example.PNG" border="0"&gt;
&lt;br&gt;
The Simple_Captcha plugin uses RMagick for generation of the CAPTCHA recognition images,
allowing for various image styles and distortion levels. The CAPTCHA can be integrated
via the controller (this one is dirt simple) or via the model (this one is just silly
simple). You can find out more about these and various other integration options on
the plugin’s page. &lt;span style=""&gt;&amp;nbsp;&lt;/span&gt;
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
If you’re doing Rails development on the Windows platform and are not feeling especially
masochistic, the &lt;strong&gt;&lt;span style="font-weight: normal;"&gt;rmagick-win32&lt;/span&gt;&lt;/strong&gt; gem,
which is bundled with a copy of the ImageMagick Windows installer, is really the only
way to use RMagick. For a long while, the 1.13.0 rmagick-win32 gem was the standard.
However, this gem is likely to cause you issues and you should really upgrade your
gem to the 1.14.1 gem or greater. These gems are fixed to work with RubyGems 0.9.4,
which is the most recent version of this gem as of this blog post. If you don’t perform
this update, you’re likely to see ImageMagick issues bubble up at runtime. 
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
On Windows, these runtime errors frequently manifest themselves as ‘cur_image’ issues.
Several of these issues have been reported on the plugin’s page. &lt;a href="http://expressica.com/2007/03/23/simple_captcha_1_0/#comment-2610"&gt;My
post on 10/6&lt;/a&gt; covered fixing these issues by upgrading your RMagick gem. Please
don’t downgrade other gems, as suggested in some other posts; this will only make
your life more miserable in the future.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
All-in-all, the RMagick Windows gem is an excellent way to make powerful image processing
capabilities available to all, including those unfortunate enough to be stuck on a
Rails on Windows development platform. The plugins built on top of RMagick such as
Simple_Captcha and &lt;a href="http://www.beckshome.com/PermaLink,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx"&gt;Attachment_Fu&lt;/a&gt; are
incredibly powerful and remain very simple by leveraging RMagick’s capabilities. Just
beware if you’re developing on Windows, a little bit of tweaking and debugging may
be necessary to get these plugins to work as advertised.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=704602af-6f43-4b6e-ae5e-071a63b3fb8d" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,704602af-6f43-4b6e-ae5e-071a63b3fb8d.aspx</comments>
      <category>Java - .NET - RoR;Rails</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c</wfw:commentRss>
      <title>Netbeans 6.0 as a Rails IDE</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c.aspx</link>
      <pubDate>Mon, 01 Oct 2007 10:21:36 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
I’ve posted about &lt;a href="http://www.beckshome.com/PermaLink,guid,50048e48-d903-4298-b4c5-948716014287.aspx"&gt;how
impressed I was with&amp;nbsp;NetBeans as a Java IDE&lt;/a&gt; and the incredible progress this
product has made in the last couple of years. I knew for a while that Ruby on Rails
and JRuby support was coming for the next major Netbeans release (v 6.0), but I hesitated
moving from RadRails to NetBeans until the feature set had stabilized. Last week,
the Netbeans 6.0 beta was released and, with &lt;a href="http://www.beckshome.com/PermaLink,guid,76970722-6bcc-4c78-9200-08372c72de19.aspx"&gt;RadRails
stagnating somewhat under the Aptana brand&lt;/a&gt;, I caved in and made the switch.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;a href="http://lifeonrails.org/2007/8/30/netbeans-the-best-ruby-on-rails-ide"&gt;George
Cook&lt;/a&gt; does an excellent Job of running through the new features with lots of nice
pretty screenshots. If you’re looking at moving to Netbeans as a Rails IDE, it’s the
first place I suggest that you go. Some of my favorite features of Netbeans (with
screens shamelessly stolen from George’s site) include code completion
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;img src="http://www.beckshome.com/content/binary/Netbeans_Code_Completion.png" border=0&gt;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
…and debugging
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;img src="http://www.beckshome.com/content/binary/Netbeans_debugging.png" border=0&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
There are several features from RadRails that I miss and that I hope the NetBeans
team will consider integrating over time. These include the ability to import a project
directly from Subversion and the test window that allows you to visually check the
status of your tests and select particular tests to run. Those features aside, I don’t
plan on going back to RadRails. NetBeans has made so much progress so quickly, I can
only imagine that it’s going to put significant distance between itself and RadRails
in the near future.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
You can &lt;a href="http://dlc.sun.com/netbeans/download/6_0/beta1/"&gt;get Netbeans 6.0
here&lt;/a&gt;, available as a skinnied-down Ruby only version if you want. Finally, since
Netbeans uses JRuby as the default interpreter and expects the Derby Java database, &lt;a href="http://weblogs.java.net/blog/bleonard/archive/2007/03/instant_rails_w.html"&gt;this
article on wiring NetBeans for InstantRails&lt;/a&gt; should get you up and moving with
the standard Ruby interpreter and MySQL database configuration, regardless of whether
you’re using InstantRails or not.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
Final note if you're brand new to Ruby on Rails and reading this post. Skip right
to &lt;a href="http://weblog.rubyonrails.com/2007/9/30/rails-2-0-0-preview-release"&gt;Rails
2.0, which is now in preview mode&lt;/a&gt;, to avoid dealing with Rails 1.2.x deprecations
and to benefit from some of the new defaults. Enjoy!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,a1d30b0d-bc89-4fca-8d37-27ea31bdfe5c.aspx</comments>
      <category>Java - .NET - RoR;Product Reviews;Rails</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=ac2fe50f-d4be-45a1-aafb-ac615b5719c6</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,ac2fe50f-d4be-45a1-aafb-ac615b5719c6.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,ac2fe50f-d4be-45a1-aafb-ac615b5719c6.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ac2fe50f-d4be-45a1-aafb-ac615b5719c6</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <title>The SOA Chasm</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,ac2fe50f-d4be-45a1-aafb-ac615b5719c6.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,ac2fe50f-d4be-45a1-aafb-ac615b5719c6.aspx</link>
      <pubDate>Sat, 29 Sep 2007 11:23:57 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
During a discussion the other day, I found myself repeatedly asking the question of
how many organizations could make the leap from an organization dabbling in services
(SOA believers) to an organization living SOA and benefiting from services (SOA achievers).
I kept referring to the SOA chasm, this nearly insurmountable gap that needs to be
crossed to move from an SOA believer to an SOA achiever. The image below is my visualization
of this gap.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;a href="http://www.beckshome.com/content/binary/SOA%20Chasm.jpg"&gt;&lt;img src="http://www.beckshome.com/content/binary/SOA%20Chasm%20Small.jpg" border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;&amp;nbsp;&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
Why is it so hard to make it from one side to the other? It’s because this leap requires
an organization to rethink everything; fundamentally changing the way they fund, govern,
build, and host their applications. If you’re wondering what an SOA achiever looks
like, check out &lt;a href="http://www.highscalability.com/amazon-architecture"&gt;this
article on the Amazon.com architecture&lt;/a&gt;. Note the stat near the top of the page
– &lt;i style="mso-bidi-font-style: normal"&gt;between 100 and 150 services are accessed
to build a page&lt;/i&gt;. These guys have made the leap.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
I’ve heard a lot of contentions that the move to an SOA represents an evolution, not
a revolution. I think this is true for only so long. An organization can incrementally
improve their capabilities as an SOA believer but once they reach the end of the SOA
believer cliff, it’s an all-or-nothing proposition. When an organization has completed
the construction of their utility services and the time comes to tackle the core business
entities, functions, and processes, it’s the SOA moment of truth. That quote from
the Matrix before Neo tries to jump the chasm between two buildings rings in my head,
“&lt;span class=d-r&gt;You have to let it all go, Neo; fear, doubt, disbelief. Free your
mind!"&lt;/span&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=ac2fe50f-d4be-45a1-aafb-ac615b5719c6" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,ac2fe50f-d4be-45a1-aafb-ac615b5719c6.aspx</comments>
      <category>SOA</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=a889d3a3-6327-4c1a-8099-3bd2dd1adbef</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,a889d3a3-6327-4c1a-8099-3bd2dd1adbef.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,a889d3a3-6327-4c1a-8099-3bd2dd1adbef.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a889d3a3-6327-4c1a-8099-3bd2dd1adbef</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <title>Microsoft Publication: SOA in the Real World</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,a889d3a3-6327-4c1a-8099-3bd2dd1adbef.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,a889d3a3-6327-4c1a-8099-3bd2dd1adbef.aspx</link>
      <pubDate>Fri, 27 Jul 2007 20:34:19 GMT</pubDate>
      <description>&lt;p class="MsoNormal"&gt;
&lt;a href="http://realworldsa.blogspot.com/2007/07/service-oriented-architecture-soa-in.html"&gt;Tad 
&lt;st1:city w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Anderson&lt;/st1:place&gt;
&lt;/st1:city&gt;
posted&lt;/a&gt; about the release of an SOA-related e-book from Microsoft concerning Service
Oriented Architecture (SOA). This is one area in which Microsoft has remained notably
quiet compared with competing enterprise software vendors such as IBM and Sun. As
Tad points out in his post, Microsoft has made some forays into SOA publications and
they have been pretty readable.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
Their most recent publication, &lt;i style=""&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cb2a8e49-bb3b-49b6-b296-a2dfbbe042d8&amp;amp;DisplayLang=en"&gt;SOA
in the Real World&lt;/a&gt; &lt;/i&gt;(&lt;a href="http://www.beckshome.com/content/binary/SOA%20in%20the%20Real%20World.pdf"&gt;mirrored
here&lt;/a&gt;), is one of the better pieces of SOA writing that I’ve encountered, vendor-specific
or otherwise. It uses Microsoft technologies to illustrate certain principles but
it manages to maintain a largely implementation-agnostic viewpoint. The e-book has
multiple authors but it was edited together in a very seamless way, which is not always
the easiest thing to pull off.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
&lt;img src="http://www.beckshome.com/content/binary/ARC.jpg" border="0"&gt; 
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
The e-book appears to have been pulled together by Microsoft’s Architectural Resource
Center (ARC). No authors are listed specifically and the ARC branding is new, somewhat
resembling the branding used for &lt;a href="http://msdn2.microsoft.com/en-us/arcjournal/default.aspx"&gt;Microsoft’s
Architecture Journal&lt;/a&gt;. The publication includes a pretty sound enterprise SOA approach,
detailed explanations of how some of the major pieces of a SOA come together and a
description of how Microsoft’s technologies fit in the mix. Whether one architect’s
opinion or the Microsoft party line, there are some insightful and succinct explanations
provided, such as the differences between Workflow Foundation and BizTalk when it
comes to implementing workflow.
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
This book is a great read for anyone looking for a solid introduction to SOA and could
well be the &lt;i style=""&gt;definitive read &lt;/i&gt;for anyone dealing with SOA and Microsoft
technologies.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=a889d3a3-6327-4c1a-8099-3bd2dd1adbef" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,a889d3a3-6327-4c1a-8099-3bd2dd1adbef.aspx</comments>
      <category>Java - .NET - RoR;Publications;SOA</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=560613dd-217c-4cb1-a6b9-df83a55191e7</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,560613dd-217c-4cb1-a6b9-df83a55191e7.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,560613dd-217c-4cb1-a6b9-df83a55191e7.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=560613dd-217c-4cb1-a6b9-df83a55191e7</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I was performing functional tests on my
models that employed Attachment_Fu this morning and thought it would be worthwhile
to share the code since it was a bit of a hassle pulling it together. Kudos to <a href="http://www.subelsky.com/2007/05/functional-testing-for-attachment-fu.html#links">Mike
Subelsky</a> for his introduction to functional testing Attachment_Fu. It got me going
in the right direction. What proved difficult once again was the multi-model controller.
Once I got over that hump, I was on my way. As you can see from all the detail in
the HTTP POST below, that was not an entirely easy task.<br /><br /><font color="#800080">class</font> ProductsControllerTest &lt; Test::Unit::TestCase<br />
...<br /><font color="#800080">def</font> test_create_with_user<br />
    num_products = Product.count<br />
    imgdata = fixture_file_upload(<font color="#0000ff">'/files/image.png',
'image/png'</font>)<br />
    audiodata = fixture_file_upload(<font color="#0000ff">'/files/sound.mp3',
'audio/mpeg'</font>)<br />
    post :create, {<font color="#ff0000">:product </font>=&gt; {<br />
            <font color="#ff0000">:name</font> =&gt; <font color="#0000ff">"Widget"</font>,<br />
            <font color="#ff0000">:description </font>=&gt; <font color="#0000ff">"A
small tool-like item"</font>,<br />
            <font color="#ff0000">:weight</font> =&gt; <font color="#0000ff">"3"</font>,<br />
            <font color="#ff0000">:price</font> =&gt; <font color="#0000ff">"19.99"</font>,<br />
            <font color="#ff0000">:language_id</font> =&gt;<font color="#0000ff"> "1"</font><br />
                  
},<br />
            <font color="#ff0000">:image</font> =&gt;
{<font color="#ff0000">:uploaded_data </font>=&gt; imgdata},<br />
            <font color="#ff0000">:audio </font>=&gt;
{<font color="#ff0000">:uploaded_data</font> =&gt; audiodata} , 
<br />
            <font color="#ff0000">:html </font>=&gt;
{ <font color="#ff0000">:multipart</font> =&gt; <font color="#800080">true</font> }<br />
          },<br />
          {<font color="#ff0000">:user_id</font> =&gt;
users(<font color="#ff0000">:valid_active_user</font>).id}<br />
    assert_response <font color="#ff0000">:redirect</font><br />
    assert_redirected_to <font color="#ff0000">:action</font> =&gt; <font color="#0000ff">'show'</font><br />
    assert_equal num_products + <font color="#0000ff">1</font>, Product.count<br />
  <font color="#800080">end</font><br />
  ...<br />
  <font color="#800080">end</font><br /><p></p><img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=560613dd-217c-4cb1-a6b9-df83a55191e7" /></body>
      <title>Functional Testing Attachment_Fu</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,560613dd-217c-4cb1-a6b9-df83a55191e7.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,560613dd-217c-4cb1-a6b9-df83a55191e7.aspx</link>
      <pubDate>Sat, 21 Jul 2007 11:41:26 GMT</pubDate>
      <description>I was performing functional tests on my models that employed Attachment_Fu this morning and thought it would be worthwhile to share the code since it was a bit of a hassle pulling it together. Kudos to &lt;a href="http://www.subelsky.com/2007/05/functional-testing-for-attachment-fu.html#links"&gt;Mike
Subelsky&lt;/a&gt; for his introduction to functional testing Attachment_Fu. It got me going
in the right direction. What proved difficult once again was the multi-model controller.
Once I got over that hump, I was on my way. As you can see from all the detail in
the HTTP POST below, that was not an entirely easy task.&lt;br&gt;
&lt;br&gt;
&lt;font color="#800080"&gt;class&lt;/font&gt; ProductsControllerTest &amp;lt; Test::Unit::TestCase&lt;br&gt;
...&lt;br&gt;
&lt;font color="#800080"&gt;def&lt;/font&gt; test_create_with_user&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; num_products = Product.count&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; imgdata = fixture_file_upload(&lt;font color="#0000ff"&gt;'/files/image.png',
'image/png'&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; audiodata = fixture_file_upload(&lt;font color="#0000ff"&gt;'/files/sound.mp3',
'audio/mpeg'&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; post :create, {&lt;font color="#ff0000"&gt;:product &lt;/font&gt;=&amp;gt; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:name&lt;/font&gt; =&amp;gt; &lt;font color="#0000ff"&gt;"Widget"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:description &lt;/font&gt;=&amp;gt; &lt;font color="#0000ff"&gt;"A
small tool-like item"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:weight&lt;/font&gt; =&amp;gt; &lt;font color="#0000ff"&gt;"3"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:price&lt;/font&gt; =&amp;gt; &lt;font color="#0000ff"&gt;"19.99"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:language_id&lt;/font&gt; =&amp;gt;&lt;font color="#0000ff"&gt; "1"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:image&lt;/font&gt; =&amp;gt;
{&lt;font color="#ff0000"&gt;:uploaded_data &lt;/font&gt;=&amp;gt; imgdata},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:audio &lt;/font&gt;=&amp;gt;
{&lt;font color="#ff0000"&gt;:uploaded_data&lt;/font&gt; =&amp;gt; audiodata} , 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;:html &lt;/font&gt;=&amp;gt;
{ &lt;font color="#ff0000"&gt;:multipart&lt;/font&gt; =&amp;gt; &lt;font color="#800080"&gt;true&lt;/font&gt; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;font color="#ff0000"&gt;:user_id&lt;/font&gt; =&amp;gt;
users(&lt;font color="#ff0000"&gt;:valid_active_user&lt;/font&gt;).id}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; assert_response &lt;font color="#ff0000"&gt;:redirect&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; assert_redirected_to &lt;font color="#ff0000"&gt;:action&lt;/font&gt; =&amp;gt; &lt;font color="#0000ff"&gt;'show'&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; assert_equal num_products + &lt;font color="#0000ff"&gt;1&lt;/font&gt;, Product.count&lt;br&gt;
&amp;nbsp; &lt;font color="#800080"&gt;end&lt;/font&gt;
&lt;br&gt;
&amp;nbsp; ...&lt;br&gt;
&amp;nbsp; &lt;font color="#800080"&gt;end&lt;/font&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=560613dd-217c-4cb1-a6b9-df83a55191e7" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,560613dd-217c-4cb1-a6b9-df83a55191e7.aspx</comments>
      <category>Rails</category>
    </item>
    <item>
      <trackback:ping>http://www.beckshome.com/Trackback.aspx?guid=8fc9bb84-3f9e-4d11-aa48-fa042b4806fd</trackback:ping>
      <pingback:server>http://www.beckshome.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.beckshome.com/PermaLink,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx</pingback:target>
      <dc:creator>Thomas Beck</dc:creator>
      <wfw:comment>http://www.beckshome.com/CommentView,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx</wfw:comment>
      <wfw:commentRss>http://www.beckshome.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8fc9bb84-3f9e-4d11-aa48-fa042b4806fd</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Continuing my Rails on Windows thread, I’m going to spend a bit of time on something
that’s brought me both some substantial gains and some minor woes lately, running
the Attachment_Fu plugin on Windows. I’ll start off with some general Attachment_Fu
information and then get into some of the quirks, which are, as expected, mostly specific
to the Windows environment.
</p>
        <p>
          <img src="http://www.beckshome.com/content/binary/attachment.gif" border="0" />
        </p>
        <p>
First, for those not in the know, Attachment_Fu is a Rails plugin that allows you
to store binary data (e.g. images, video, documents) and associate it with other models
in your Rails application. Metadata (content type, size, height, width) about the
attachment is stored in a separate model. Attachment_Fu’s sweet spot is handling images.
It can handle automatic image conversion and thumbnailing using a number of popular
image processors such as ImageScience, RMagick, or minmagick. Although not provided,
you can imagine that Attachment_Fu might be extended to handle other types of binary
processing utilities such as PDF converters or audio/video transcoding software. The
other very cool thing about Attachment_Fu is that it provides support for pluggable
persistence mechanisms. Out of the box, it allows for storage on the file system,
as binary information in a database or on Amazon’s S3 storage service. 
</p>
        <p>
There is an abundance of information already written about Attachment_Fu so to avoid
re-inventing the wheel, I’ll provide what I found to be the best sources of information
to start.<br /></p>
        <ul>
          <li>
            <a href="http://clarkware.com/cgi/blosxom/2007/02/24">Mike Clark’s tutorial</a> is
the gold standard introduction to using Attachment_Fu. The code is simplistic but
rock solid. It covers using both the file system and S3 for storage and will get you
up and running on Attachment_Fu in no time.<br /></li>
        </ul>
        <ul>
          <li>
            <a href="http://www.railsweenie.com/forums/3/topics/1455">This post</a> on the Attachment_Fu
message board provides a solution to associating the <i>attachment</i> model with
another model (i.e. making it an attachment to something). The post provides both
the controller and the view code for uploading the initial attachment and rendering
it. Handling the attachment relationship in your MVC is going to be a fairly common
requirement and most Attachment_Fu users will benefit from this post.<br /></li>
        </ul>
        <p>
For my part, I’m going to provide some controller source code for updating the attachment
when you have a relationship with another model (an extension of the second item above)
since this is one area that wasn’t covered well anywhere else and might save you some
time in your travels. In the code below, my main model is the <i>product</i> and the <i>image </i>is
the model where a photo and thumbnail are stored using Attachment_Fu.
</p>
        <font color="#800080">class</font> ProductController &lt; ApplicationController<br /><br />
  <font color="#800080">def</font> update<br />
    <font color="#000080">@product</font> = Product.find(params[<font color="#ff0000">:id</font>])<br />
    <font color="#008000"># Load up product categories for the view</font><br />
    <font color="#000080">@all_categories</font> = Category.find(<font color="#ff0000">:all</font>, <font color="#ff0000">:order</font>=&gt;<font color="#0000ff">"name_en"</font>)<br />
    <font color="#800080">if </font><font color="#000080">@product</font>.update_attributes(params[<font color="#ff0000">:product</font>])<br />
      <font color="#800080">if </font>!params[<font color="#ff0000">:image</font>][<font color="#ff0000">:uploaded_data</font>].blank?<br />
        <font color="#008000"># My product only
has one image / thumbnail, I'll destroy 'each'<br />
        # wait 3 # See quirk no.1 below</font><br />
        <font color="#000080">@product</font>.images.<font color="#800080">each </font>{|img|
img.destroy}<br />
        <font color="#000080">@image</font> = <font color="#000080">@product</font>.images
||= Image.<font color="#800080">new</font><br />
        <font color="#000080">@image</font> = <font color="#000080">@product</font>.images.build(params[<font color="#ff0000">:image</font>])<br />
        <font color="#000080">@image</font>.save<br />
      <font color="#800080">end</font><br />
      flash[<font color="#ff0000">:notice</font>] = <font color="#0000ff">'Product
was successfully updated.'</font><br />
      redirect_to <font color="#ff0000">:action </font>=&gt; <font color="#0000ff">'show'</font>, <font color="#ff0000">:id</font> =&gt; <font color="#000080">@product</font><br />
    <font color="#800080">else</font><br />
      render <font color="#ff0000">:action</font> =&gt; <font color="#0000ff">'edit'</font><br />
    <font color="#800080">end<br />
  end<br />
  
<br />
end</font><span style="font-size: 10pt; color: black; font-family: 'Courier New';"><span></span></span><p class="MsoNormal"><br /></p><p class="MsoNormal">
The links above, in combination with my snippet, should get you through creating an
attachment and handling CRUD for an attachment and its parent model from a single
view. Now comes the Windows quirkiness. Not knowing to expect these Attachment_Fu
quirks and then having to root out the cause of the behavior took up a lot of time.
It turns out that most of I found that most of the quirks are documented in some way,
shape, or form. I’ve pulled together a list of the quirks as well as some best practice
workarounds.<br /></p><ul><li>
When running Attachment_Fu on Windows, the most commonly accounted problem is the
“Size Is Not Included In List” validation error. <a href="http://www.railsweenie.com/forums/3/topics/1257">This
post</a> goes into some details and speculation around the cause of the issue. It
appears that no amount of fixing in the Ruby code is going to help here since it appears
to be a Windows file system issue. The workaround is really simple, just add a<span style="font-family: 'Courier New';"> wait
x </span>statement before your attachment processing and things will be golden. The
x (which denotes seconds) time will vary based upon the size of the attachments you
are processing. Bigger attachments require more of a wait. Also, be sure to comment
this code out in production since this is a Windows only issue.</li></ul><blockquote><font color="#ff0000"><i>7/19/2007 Update - Rick suggested using RUBY_PLATFORM
to determine if the wait should be invoked. I tested this and it worked as suggested</i></font><br /></blockquote><ul><li>
When you invoke the <span style="font-family: 'Courier New';">destroy </span>method
on your attachment using Attachment_Fu on Windows, your models reference to the attachment
will be deleted but the physical attachments themselves will not be deleted if you
have persisted them to the file system. If you look at the Attachment_Fu source code
or your log files, you’ll see that Attachment_Fu assumes that you are using a UNIX-based
system and executes UNIX commands like <span style="font-family: 'Courier New';">rm </span>to
remove these files. These commands will obviously not work in a Windows environment,
leaving you with a bunch of zombie files. This should not be a problem if you use
a database or S3 persistence mechanism since these mechanisms are independent of the
operating system.</li></ul><blockquote><font color="#ff0000"><i>7/19/2007 Update - Rick corrected me. He is indeed
calling the OS safe FileUtils.rm in the file system backend. It still isn't working
though - at least on my machine.<br /></i></font></blockquote><ul><li>
My last Windows specific quirk is actually an Internet Explorer issue. If your attachments
are images, you may have problems with uploading JPEG’s using the default Attachment_Fu
plugin. From what I’ve been able to determine, if you upload a JPEG from IE with a
file extension of <span style="font-family: 'Courier New';">.JPEG, </span>IE will
set the MIME type to <span style="font-family: 'Courier New';">image/pjpeg</span> for
a progressive JPEG. However, if the image extension is simply <span style="font-family: 'Courier New';">.jpg, </span>IE
will set the MIME type to <span style="font-family: 'Courier New';">image/jpg. </span>This
MIME type, however, is not included in the default list of content types accepted
by Attachment_Fu. My suggestion is to add this type to the list in the source code
until Rick can get around to modifying the source.</li></ul><blockquote><font color="#ff0000"><i>7/19/2007 Update - The MIME type was added to
source. For reference, Rick suggested that this could have been done without changing
the source simply by adding<br /></i><font face="Courier New">    Technoweenie::AttachmentFu.content_types
&lt;&lt; 'image/jpg</font></font><br /></blockquote><span>The last quirk for my post should be meaningful to all of those
using Capistrano, the Rails migration utility. Capistrano manages versions of the
application for rollforward / rollback by creating symlinks to previous versions of
an application and deploying the most recent version of your entire application tree
from your version control system (e.g. Subversion). However, since it’s very unlikely
that you are storing all of the attachments for your application under version control,
the attachments will be unlinked and no longer available when you migrate a new version
of your application to production. To get around this issue, <a href="http://www.almosteffortless.com/2007/03/25/working-with-attachment_fu/">the
solution proposed here</a> creates a separate physical directory for the attachments
outside of your application’s directory and then updates a symlink from your application’s
attachment directory to the separate physical directory every time you migrate. </span><p></p><img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=8fc9bb84-3f9e-4d11-aa48-fa042b4806fd" /></body>
      <title>Attachment_Fu On Windows</title>
      <guid isPermaLink="false">http://www.beckshome.com/PermaLink,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx</guid>
      <link>http://www.beckshome.com/PermaLink,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx</link>
      <pubDate>Thu, 19 Jul 2007 18:22:16 GMT</pubDate>
      <description>&lt;p&gt;
Continuing my Rails on Windows thread, I’m going to spend a bit of time on something
that’s brought me both some substantial gains and some minor woes lately, running
the Attachment_Fu plugin on Windows. I’ll start off with some general Attachment_Fu
information and then get into some of the quirks, which are, as expected, mostly specific
to the Windows environment.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.beckshome.com/content/binary/attachment.gif" border="0"&gt;
&lt;/p&gt;
&lt;p&gt;
First, for those not in the know, Attachment_Fu is a Rails plugin that allows you
to store binary data (e.g. images, video, documents) and associate it with other models
in your Rails application. Metadata (content type, size, height, width) about the
attachment is stored in a separate model. Attachment_Fu’s sweet spot is handling images.
It can handle automatic image conversion and thumbnailing using a number of popular
image processors such as ImageScience, RMagick, or minmagick. Although not provided,
you can imagine that Attachment_Fu might be extended to handle other types of binary
processing utilities such as PDF converters or audio/video transcoding software. The
other very cool thing about Attachment_Fu is that it provides support for pluggable
persistence mechanisms. Out of the box, it allows for storage on the file system,
as binary information in a database or on Amazon’s S3 storage service. 
&lt;/p&gt;
&lt;p&gt;
There is an abundance of information already written about Attachment_Fu so to avoid
re-inventing the wheel, I’ll provide what I found to be the best sources of information
to start.&lt;br&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://clarkware.com/cgi/blosxom/2007/02/24"&gt;Mike Clark’s tutorial&lt;/a&gt; is
the gold standard introduction to using Attachment_Fu. The code is simplistic but
rock solid. It covers using both the file system and S3 for storage and will get you
up and running on Attachment_Fu in no time.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.railsweenie.com/forums/3/topics/1455"&gt;This post&lt;/a&gt; on the Attachment_Fu
message board provides a solution to associating the &lt;i&gt;attachment&lt;/i&gt; model with
another model (i.e. making it an attachment to something). The post provides both
the controller and the view code for uploading the initial attachment and rendering
it. Handling the attachment relationship in your MVC is going to be a fairly common
requirement and most Attachment_Fu users will benefit from this post.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
For my part, I’m going to provide some controller source code for updating the attachment
when you have a relationship with another model (an extension of the second item above)
since this is one area that wasn’t covered well anywhere else and might save you some
time in your travels. In the code below, my main model is the &lt;i&gt;product&lt;/i&gt; and the &lt;i&gt;image &lt;/i&gt;is
the model where a photo and thumbnail are stored using Attachment_Fu.
&lt;/p&gt;
&lt;font color="#800080"&gt;class&lt;/font&gt; ProductController &amp;lt; ApplicationController&lt;br&gt;
&lt;br&gt;
&amp;nbsp; &lt;font color="#800080"&gt;def&lt;/font&gt; update&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@product&lt;/font&gt; = Product.find(params[&lt;font color="#ff0000"&gt;:id&lt;/font&gt;])&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;# Load up product categories for the view&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@all_categories&lt;/font&gt; = Category.find(&lt;font color="#ff0000"&gt;:all&lt;/font&gt;, &lt;font color="#ff0000"&gt;:order&lt;/font&gt;=&amp;gt;&lt;font color="#0000ff"&gt;"name_en"&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;if &lt;/font&gt;&lt;font color="#000080"&gt;@product&lt;/font&gt;.update_attributes(params[&lt;font color="#ff0000"&gt;:product&lt;/font&gt;])&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;if &lt;/font&gt;!params[&lt;font color="#ff0000"&gt;:image&lt;/font&gt;][&lt;font color="#ff0000"&gt;:uploaded_data&lt;/font&gt;].blank?&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;# My product only
has one image / thumbnail, I'll destroy 'each'&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # wait 3 # See quirk no.1 below&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@product&lt;/font&gt;.images.&lt;font color="#800080"&gt;each &lt;/font&gt;{|img|
img.destroy}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@image&lt;/font&gt; = &lt;font color="#000080"&gt;@product&lt;/font&gt;.images
||= Image.&lt;font color="#800080"&gt;new&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@image&lt;/font&gt; = &lt;font color="#000080"&gt;@product&lt;/font&gt;.images.build(params[&lt;font color="#ff0000"&gt;:image&lt;/font&gt;])&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#000080"&gt;@image&lt;/font&gt;.save&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;end&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flash[&lt;font color="#ff0000"&gt;:notice&lt;/font&gt;] = &lt;font color="#0000ff"&gt;'Product
was successfully updated.'&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirect_to &lt;font color="#ff0000"&gt;:action &lt;/font&gt;=&amp;gt; &lt;font color="#0000ff"&gt;'show'&lt;/font&gt;, &lt;font color="#ff0000"&gt;:id&lt;/font&gt; =&amp;gt; &lt;font color="#000080"&gt;@product&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;else&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; render &lt;font color="#ff0000"&gt;:action&lt;/font&gt; =&amp;gt; &lt;font color="#0000ff"&gt;'edit'&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;end&lt;br&gt;
&amp;nbsp; end&lt;br&gt;
&amp;nbsp; 
&lt;br&gt;
end&lt;/font&gt;&lt;span style="font-size: 10pt; color: black; font-family: 'Courier New';"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;p class="MsoNormal"&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;p class="MsoNormal"&gt;
The links above, in combination with my snippet, should get you through creating an
attachment and handling CRUD for an attachment and its parent model from a single
view. Now comes the Windows quirkiness. Not knowing to expect these Attachment_Fu
quirks and then having to root out the cause of the behavior took up a lot of time.
It turns out that most of I found that most of the quirks are documented in some way,
shape, or form. I’ve pulled together a list of the quirks as well as some best practice
workarounds.&lt;br&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
When running Attachment_Fu on Windows, the most commonly accounted problem is the
“Size Is Not Included In List” validation error. &lt;a href="http://www.railsweenie.com/forums/3/topics/1257"&gt;This
post&lt;/a&gt; goes into some details and speculation around the cause of the issue. It
appears that no amount of fixing in the Ruby code is going to help here since it appears
to be a Windows file system issue. The workaround is really simple, just add a&lt;span style="font-family: 'Courier New';"&gt; wait
x &lt;/span&gt;statement before your attachment processing and things will be golden. The
x (which denotes seconds) time will vary based upon the size of the attachments you
are processing. Bigger attachments require more of a wait. Also, be sure to comment
this code out in production since this is a Windows only issue.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&lt;font color="#ff0000"&gt;&lt;i&gt;7/19/2007 Update - Rick suggested using RUBY_PLATFORM
to determine if the wait should be invoked. I tested this and it worked as suggested&lt;/i&gt;&lt;/font&gt;
&lt;br&gt;
&lt;/blockquote&gt; 
&lt;ul&gt;
&lt;li&gt;
When you invoke the &lt;span style="font-family: 'Courier New';"&gt;destroy &lt;/span&gt;method
on your attachment using Attachment_Fu on Windows, your models reference to the attachment
will be deleted but the physical attachments themselves will not be deleted if you
have persisted them to the file system. If you look at the Attachment_Fu source code
or your log files, you’ll see that Attachment_Fu assumes that you are using a UNIX-based
system and executes UNIX commands like &lt;span style="font-family: 'Courier New';"&gt;rm &lt;/span&gt;to
remove these files. These commands will obviously not work in a Windows environment,
leaving you with a bunch of zombie files. This should not be a problem if you use
a database or S3 persistence mechanism since these mechanisms are independent of the
operating system.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&lt;font color="#ff0000"&gt;&lt;i&gt;7/19/2007 Update - Rick corrected me. He is indeed
calling the OS safe FileUtils.rm in the file system backend. It still isn't working
though - at least on my machine.&lt;br&gt;
&lt;/i&gt;&lt;/font&gt;&lt;/blockquote&gt; 
&lt;ul&gt;
&lt;li&gt;
My last Windows specific quirk is actually an Internet Explorer issue. If your attachments
are images, you may have problems with uploading JPEG’s using the default Attachment_Fu
plugin. From what I’ve been able to determine, if you upload a JPEG from IE with a
file extension of &lt;span style="font-family: 'Courier New';"&gt;.JPEG, &lt;/span&gt;IE will
set the MIME type to &lt;span style="font-family: 'Courier New';"&gt;image/pjpeg&lt;/span&gt; for
a progressive JPEG. However, if the image extension is simply &lt;span style="font-family: 'Courier New';"&gt;.jpg, &lt;/span&gt;IE
will set the MIME type to &lt;span style="font-family: 'Courier New';"&gt;image/jpg. &lt;/span&gt;This
MIME type, however, is not included in the default list of content types accepted
by Attachment_Fu. My suggestion is to add this type to the list in the source code
until Rick can get around to modifying the source.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;&lt;font color="#ff0000"&gt;&lt;i&gt;7/19/2007 Update - The MIME type was added to
source. For reference, Rick suggested that this could have been done without changing
the source simply by adding&lt;br&gt;
&lt;/i&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Technoweenie::AttachmentFu.content_types
&amp;lt;&amp;lt; 'image/jpg&lt;/font&gt;&lt;/font&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;span&gt;The last quirk for my post should be meaningful to all of those
using Capistrano, the Rails migration utility. Capistrano manages versions of the
application for rollforward / rollback by creating symlinks to previous versions of
an application and deploying the most recent version of your entire application tree
from your version control system (e.g. Subversion). However, since it’s very unlikely
that you are storing all of the attachments for your application under version control,
the attachments will be unlinked and no longer available when you migrate a new version
of your application to production. To get around this issue, &lt;a href="http://www.almosteffortless.com/2007/03/25/working-with-attachment_fu/"&gt;the
solution proposed here&lt;/a&gt; creates a separate physical directory for the attachments
outside of your application’s directory and then updates a symlink from your application’s
attachment directory to the separate physical directory every time you migrate. &lt;/span&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.beckshome.com/aggbug.ashx?id=8fc9bb84-3f9e-4d11-aa48-fa042b4806fd" /&gt;</description>
      <comments>http://www.beckshome.com/CommentView,guid,8fc9bb84-3f9e-4d11-aa48-fa042b4806fd.aspx</comments>
      <category>Rails</category>
    </item>
  </channel>
</rss>