Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7046737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:41:10+00:00 2026-05-28T02:41:10+00:00

I have a Rakefile which, on my own-built Ruby 1.9.3 installation, correctly outputs the

  • 0

I have a Rakefile which, on my own-built Ruby 1.9.3 installation, correctly outputs the Unix shell equivalent when I use a FileUtils method such as cp, mkdir etc.

However, on the stock Ruby that ships with Mac OS X (specifically 10.5), which is version 1.8.6, they don’t do this.

I’d like them to output the commands as they’re performed. Is there a way to enable this in OS X’s 1.8.6 Ruby, short of adding :verbose => true to every call? (Which may not even work.)

The Rakefile in question is: https://github.com/dpkendal/tools-osx/blob/master/Rakefile

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:41:11+00:00Added an answer on May 28, 2026 at 2:41 am

    That doesn’t make sense. 1.9.3 should not do :verbose unless explicitly told to do so. You can look at the implementation of mkdir in the 1.9.3 lib for example:

      def mkdir(list, options = {})
        fu_check_options options, OPT_TABLE['mkdir']
        list = fu_list(list)
        fu_output_message "mkdir #{options[:mode] ? ('-m %03o ' % options[:mode]) : ''}#{list.join ' '}" if options[:verbose]
        return if options[:noop]
    
        list.each do |dir|
          fu_mkdir dir, options[:mode]
        end
      end
    

    There you can see that the message is not generated unless the :verbose option is explicitly supplied.

    However to enable :verbose across all FileUtils methods you can simply include FileUtils::Verbose into your namespace. This works in both 1.8 and 1.9 ruby:

    irb(main):001:0> RUBY_VERSION
    => "1.8.7"
    irb(main):002:0> include FileUtils::Verbose
    => Object
    irb(main):003:0> mkdir 'fooof'
    mkdir fooof
    => ["fooof"]
    

    BTW, it might be that Rake already does this in 1.9.3, which would explain why it does what it does in 1.9.3 and not in 1.8.6. I did not check this, but that’s the only explanation I can think of.


    Rake provides its own FileUtils extension called Rake::FileUtilsExt. This module has a verbose flag. To activate it simply add this to the top of the Rakefile:

    Rake::FileUtilsExt.verbose(true)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have an installation of ruby 1.9.1 ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] when
I have a number of file tasks in my Rakefile which look like file
I have a rakefile which uses jsmin to minify the files. one thing that
I have developed a gem which implements some algorithms that we'll use within a
I have a custom Rakefile which calls different file tasks. Sometimes a file that
I have a Rakefile with a Rake task that I would normally call from
i have a Rakefile with a rule like this : rule '.so' => '.cc'
I have a rails rake task which runs just fine. I want this task
I have a Rakefile that includes this: Jeweler::Tasks.new do |gem| # ... gem.add_dependency('json') end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.