Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Rake Task Management Essentials
  • Table Of Contents Toc
Rake Task Management Essentials

Rake Task Management Essentials

By : Andrey Koleshko
5 (4)
close
close
Rake Task Management Essentials

Rake Task Management Essentials

5 (4)
By: Andrey Koleshko

Overview of this book

Table of Contents (18 chapters)
close
close
Rake Task Management Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
1
Index

Using command-line arguments for debugging


The main information in the development process is a backtrace—a report of a certain point in time during the execution of a program. When a rake task fails, you won't need the whole backtrace; Rake narrows it in the default behavior. To explain the idea, see the following Rakefile with failed task1:

task :task1 do
  raise 'this is an error'
end

task :task2 => :task1 do
  puts 'task 2'
end

The following is a result of the task2 execution:

$ rake task2
rake aborted!
this is an error
~/rakefile:2:in `block in <top (required)>'
Tasks: TOP => task2 => task1
(See full trace by running task with --trace)

Notice that the backtrace contains only one line of code (~/rakefile:2:in 'block in <top (required)>'). To see the full trace of the code execution, use the --backtrace option:

$ rake --backtrace task2  
rake aborted!
this is an error
~/rakefile1:2:in `block in <top (required)>'
.../ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/task...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Rake Task Management Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon