“Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
Anything invented after you’re thirty-five is against the natural order of things.”—Douglas Adams
“If something saps your energy and puts you in a bad mood, delegate it even if you have to pay someone more to do it than it would cost you do to yourself. And if something gives you energy, maybe you should do it yourself even if someone else could do it cheaper.”—John D. Cook, Whether to delegate
“It’s easy to get caught up in the heady buzz of making money. You should regard money as fuel for what you really want to do, not as a goal in and of itself. Money is like gas in the car — you need to pay attention or you’ll end up on the side of the road — but a well-lived life is not a tour of gas stations!”—Tim O’Reilly
“Plans are worthless, but planning is everything. There is a very great distinction because when you are planning for an emergency you must start with this one thing: the very deﬁnition of “emergency” is that it is unexpected, therefore it is not going to happen the way you are planning.”—Dwight D. Eisenhower
“An underlying problem with artificial intelligence that I have personally experience in my forty years in this area is that as soon as an AI technique works, it’s no longer considered AI and is spun off as its own field (for example, character recognition, speech recognition, machine vision, robotics, data mining, medical informatics, automated investing.)”—Ray Kurzweil
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”—Tony Hoare
“A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”—Robert A. Heinlein
“I didn’t really expect anyone to use it because it’s so hard to use, but that turns out to be its big appeal. No technology can ever be too arcane or complicated for the black t-shirt crowd.”—Linus Torvalds on Git
“We believe it is better to have application programmers deal with performance problems due to overuse of transactions as bottlenecks arise, rather than always coding around the lack of transactions.”—Several Google authors in the Spanner: Google’s Globally-Distributed Database paper (PDF link)
/usr/lib/ruby/gems/1.8/gems/fpm-0.4.17/lib/fpm/../../templates/rpm.erb:68:in `output': undefined method `shellescape' for Shellwords:Module (NoMethodError)
from (eval):3:in `each_without_optional_block'
from (eval):3:in `each'
from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.17/lib/fpm/../../templates/rpm.erb:67:in `output'
from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.17/lib/fpm/package/rpm.rb:189:in `output'
from /usr/lib/ruby/gems/1.8/gems/fpm-0.4.17/lib/fpm/command.rb:368:in `execute'
from /usr/lib/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:64:in `run'
from /usr/lib/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:126:in `run'
from /usr/bin/fpm:19:in `load'
So after some Googling, I found that I needed to monkeypatchShellwords.shellescape. I’d heard about monkeypatching in Ruby before and even had an idea of how to do it if I were developing an application myself, but in this case, I need fpm to use this monkey patch.
With my limited Ruby knowledge, the crude solution was to patch /usr/lib/ruby/1.8/shellescape.rb itself:
--- shellwords.rb.orig 2012-09-21 18:56:38.000000000 -0300
+++ shellwords.rb 2012-09-21 18:56:50.000000000 -0300
@@ -56,5 +56,31 @@
+ def shellescape(str)
+ str = str.to_s
+ # An empty argument will be skipped, so return empty quotes.
+ return "''" if str.empty?
+ str = str.dup
+ # Treat multibyte characters as is. It is caller's responsibility
+ # to encode the string in the right encoding for the shell
+ # environment.
+ str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1")
+ # A LF cannot be escaped with a backslash because a backslash + LF
+ # combo is regarded as line continuation and simply ignored.
+ str.gsub!(/\n/, "'\n'")
+ return str
+ module_function :shellescape
+ class << self
+ alias escape shellescape