Forum: Ruby Rake and 1.8.4

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jamis B. (Guest)
on 2005-12-24 21:57
(Received via mailing list)
Looks like there may be a problem with Rake 0.6.2 and Ruby 1.8.4. If
I have a task that uses either chdir or cd, I get an error:

   rake aborted!
   no such option: noop
   /Users/jamis/ruby184/lib/ruby/1.8/fileutils.rb:1422:in
`fu_check_options'
   /Users/jamis/ruby184/lib/ruby/1.8/fileutils.rb:119:in `cd'
   /Users/jamis/ruby184/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:
640:in `cd'
   ./rakefile:67

Apparenly, FileUtils.chdir doesn't take the :noop parameter anymore?
I'm working around this by just invoking FileUtils.chdir directly.

- Jamis
=?ISO-8859-1?Q?Florian_Gro=DF?= (Guest)
on 2005-12-24 22:21
(Received via mailing list)
Jamis B. wrote:

> Apparenly, FileUtils.chdir doesn't take the :noop parameter anymore?
> I'm working around this by just invoking FileUtils.chdir directly.

There's this in the change log:

> 	* lib/fileutils.rb (cd): no longer accept :noop option, related
> 	  code is useless (backported from trunk, rev 1.67).
> 	  [ruby-core:05858] [ruby-Bugs:2494]

I think you are supposed to use FileUtils::DryRun somehow instead.
Haven't looked at it in detail...
Ross B. (Guest)
on 2005-12-25 01:10
(Received via mailing list)
On Sat, 24 Dec 2005 19:56:00 -0000, Jamis B. 
<removed_email_address@domain.invalid>
wrote:

>    ./rakefile:67
>
> Apparenly, FileUtils.chdir doesn't take the :noop parameter anymore? I'm
> working around this by just invoking FileUtils.chdir directly.
>
> - Jamis
>

IIRC I encountered this very bug some time ago, with 1.8.3. The advice I
found at the time was to switch to a beta version, 0.6.99.2, which you
can
find at: http://onestepback.org/betagems/gems/rake-0.6.99.2.gem . Since
making the switch I've encountered no such problems; I've just tried the
following Rakefile with 1.8.4:

	task :default do
	  chdir('..') do
	    puts `pwd`
	  end
	end

And it gives:

	(in /home/rosco/dev/ruby/raketest)
	cd ..
	/home/rosco/dev/ruby
	cd -
Jim W. (Guest)
on 2005-12-27 18:32
Ross B. wrote:

> IIRC I encountered this very bug some time ago, with 1.8.3. The advice I
> found at the time was to switch to a beta version, 0.6.99.2, which you
> can
> find at: http://onestepback.org/betagems/gems/rake-0.6.99.2.gem . Since
> making the switch I've encountered no such problems; I've just tried the
> following Rakefile with 1.8.4:

Rake 0.6.99.2 is the release candidate for Rake 0.7.0.  There is still
some documentation to be done, but I plan to finish that this week and
officially release a new version of rake.

--
-- Jim W.
This topic is locked and can not be replied to.