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
Jamis Buck 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...
···
--
http://flgr.0x42.net/
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 -
···
On Sat, 24 Dec 2005 19:56:00 -0000, Jamis Buck <jamis@37signals.com> wrote:
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
--
Ross Bamford - rosco@roscopeco.remove.co.uk
Ross Bamford 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 Weirich
--
Posted via http://www.ruby-forum.com/\.