Skip to content

Instantly share code, notes, and snippets.

@hinmn
Created December 26, 2012 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hinmn/c07cb6287f5e54c477a8 to your computer and use it in GitHub Desktop.
Save hinmn/c07cb6287f5e54c477a8 to your computer and use it in GitHub Desktop.
Error building sinatra-book with --trace
hinmn-air:sinatra-book hinmn$ bundle exec rake book:build --trace
** Invoke book:build (first_time)
** Execute book:build
sh: /Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/vendor/wkhtmltopdf: cannot execute binary file
rake aborted!
command failed: "/Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/vendor/wkhtmltopdf" "--page-size" "Letter" "--margin-top" "0.75in" "--margin-right" "0.75in" "--margin-bottom" "0.75in" "--margin-left" "0.75in" "--encoding" "UTF-8" "--quiet" "-" "-"
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/pdfkit-0.5.2/lib/pdfkit/pdfkit.rb:71:in `to_pdf'
/Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/book.rb:21:in `build'
/Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/Rakefile:7:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p362/bin/rake:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => book:build
@shenzhaoyan
Copy link

  1. rm vendor/wkhtmltopdf
  2. brew install wkhtmltopdf
  3. ln -s vendor/wkhtmltopdf /usr/local/bin/wkhtmltopdf
  4. bundle exec rake book:build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment