From 197f52b0e6b2b1d885932f4ebbf85413188cdc6f Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sun, 3 Mar 2013 12:51:25 -0800 Subject: [PATCH] Fix jekyll-import LoadError message. --- bin/jekyll | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/jekyll b/bin/jekyll index d20c6018..37fdd312 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -63,6 +63,7 @@ command :import do |c| c.syntax = 'jekyll import [options]' c.description = 'Import your old blog to Jekyll' + c.option '--source', 'Source file or URL to migrate from' c.option '--file', 'File to migrate from' c.option '--dbname', 'Database name to migrate from' c.option '--user', 'Username to use when migrating' @@ -72,8 +73,11 @@ command :import do |c| c.action do |args, options| begin require 'jekyll-import' - rescue - abort "You must install the 'jekyll-import' gem before continuing." + rescue LoadError + msg = "You must install the 'jekyll-import' gem before continuing.\n" + msg += "* Do this by running `gem install jekyll-import`.\n" + msg += "* Or if you need root privileges, run `sudo gem install jekyll-import`." + abort msg end Jekyll::Commands::Import.process(args.first, options) end