Jim Weirich
2005-Mar-15 06:40 UTC
New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
I have a new version of Rake that I''m (almost) ready to release. But before I make an official release, I would like some Rails folk to give it it try ... Why? Because it contains a workaround for the notorious Ruby 1.8.2 test/unit bug. Using this version of rails, it should be possible to unit test a rails app without patching the Ruby 1.8.2 test/unit library. Where to get it? Right now it is only available for download from http://onestepback.org/download/rake-0.4.15.1.gem (Note: just do a regular download using your browser, I don''t have gem server setup on that box so a gem remote install won''t work). After you ownload it to a local file, then run gem install rake-0.4.15.1.gem (admin access may be needed). Then *unpatch* your Ruby 1.8.2 system and try running the unit tests. If I hear good reports, I will go ahead and create an official new release for rake. -- -- Jim Weirich jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Stian Grytøyr
2005-Mar-15 08:31 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
Jim Weirich <jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org> wrote:> Using this version of [Rake], it should be possible to unit test a rails app > without patching the Ruby 1.8.2 test/unit library.Is this still a problem with recent Rubys (or rather recent test/units)? I downloaded and compiled the "official" Ruby 1.8.2 last week, and have run lots of Rails unit tests with Rake without any problems, and without installing the patch. Of course, a new version of Rake is probably good news regardless, I just thought I''d mention it. -- Regards, Stian Grytøyr
Jim Weirich
2005-Mar-15 12:47 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
On Tuesday 15 March 2005 03:31 am, Stian Grytøyr wrote:> Jim Weirich <jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org> wrote: > > Using this version of [Rake], it should be possible to unit test a rails > > app without patching the Ruby 1.8.2 test/unit library. > > Is this still a problem with recent Rubys (or rather recent test/units)? > I downloaded and compiled the "official" Ruby 1.8.2 last week, and > have run lots of Rails unit tests with Rake without any problems, and > without installing the patch.Actually, one of the reasons this fix was so long in coming is that I couldn''t reproduce the error on my projects. Then last night on a brand new project, I was getting strange errors on an absolutely trivial test case. The bug had finally been triggered. My guess is that it is sensitive to the exact order and nature of the files that are included. -- -- Jim Weirich jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Nathaniel Talbott
2005-Mar-15 14:21 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
On Tue, 15 Mar 2005 09:31:42 +0100, Stian Grytøyr <sgrytoyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is this still a problem with recent Rubys (or rather recent test/units)? > I downloaded and compiled the "official" Ruby 1.8.2 last week, and > have run lots of Rails unit tests with Rake without any problems, and > without installing the patch.It is fixed in the latest 1.8 snapshot (and has been for a few weeks). However, there''s definite value in Jim''s fix, since a lot of folks only run off of the actual point release, not stable snapshots. HTH, Nathaniel
Stian Grytøyr
2005-Mar-15 17:45 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby 1.8.2 unit test bug
Nathaniel Talbott <ntalbott-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It is fixed in the latest 1.8 snapshot (and has been for a few weeks).Aha, that explains it. At least if you by snapshot mean the official stable 1.8.2 src package on the Ruby web, because I''m pretty sure that''s what I downloaded.> However, there''s definite value in Jim''s fix, since a lot of folks > only run off of the actual point release, not stable snapshots.Agreed! -- Regards, Stian Grytøyr
Jim Weirich
2005-Mar-15 19:08 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby1.8.2 unit test bug
Stian Grytøyr said:> Nathaniel Talbott <ntalbott-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> It is fixed in the latest 1.8 snapshot (and has been for a few weeks). > > Aha, that explains it. At least if you by snapshot mean the official > stable > 1.8.2 src package on the Ruby web, because I''m pretty sure that''s what I > downloaded.I think the stable snapshot is picture of the ruby source tree at a relatively stable point in time. (i.e. this link ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz on the Ruby download page). The Official stable 1.8.2 src package is the official stable release(i.e. this link ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz on the Ruby download page). It does not have the test/unit fix yet. One question for those that use the stable snapshot: What is the value of RUBY_VERSION in that snapshot. I use a value of "1.8.2" to trigger the fix. Is that adequate? -- -- Jim Weirich jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Stian Grytøyr
2005-Mar-15 19:40 UTC
Re: New Beta version of Rake for Rails Users ... Fix for Ruby1.8.2 unit test bug
Jim Weirich <jim-Fxty1mrVU9GlFc2d6oM/ew@public.gmane.org> wrote:> The Official stable 1.8.2 src package is the official stable release(i.e. > this link ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.2.tar.gz on the Ruby > download page). It does not have the test/unit fix yet.Hmm, in that case I think your explanation from earlier must be the correct one. I have the stable 1.8.2 release. $ruby --version ruby 1.8.2 (2004-12-25) [i686-linux] Guess I''ve just been lucky until now :) -- Regards, Stian Grytøyr