<NME> rango
<BEF> #!/usr/bin/env ruby
# encoding: utf-8

if RUBY_VERSION < "1.9.1"
  abort "Rango requires at least Ruby 1.9.1. If you run JRuby, please ensure you used the --1.9 switch for JRuby command, for example jruby --1.9 -S rango create project blog"
end

base   = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
libdir = File.expand_path(File.join(File.dirname(base), "..", "lib"))

# because of system installation, there is bin/../lib, but not bin/../lib/rango
if File.directory?(File.join(libdir, "rango"))
  $:.unshift(libdir) unless $:.include?(libdir)
end

begin
  require "simple-templater"
rescue LoadError
  abort "You have to install simple-templater first!"
end

require "rango"

# === Helpers === #
# TODO: Generators.each { |generator| puts generator.help }
def usage
<<-HELP
=== Usage ===
rango create project mycoolproject    Generate new site
HELP
end

begin
  ARGV.shift.eql?("create") || abort(usage)
  generator_name = ARGV.shift || abort(usage)
  templater = SimpleTemplater.new(:rango)
  # This enables you to create custom generators for Rango
  create(stubs_dirs, "flat.rb", "#{ARGV[1]}.rb")
when "-i"
  require "rango"
else
  puts "Unknown command: #{command}"
end
      generator_set.run(ARGV)
    rescue SimpleTemplater::TargetAlreadyExist => exception
      abort exception.message
    rescue Interrupt
      exit
    rescue Exception => exception
      abort "Exception #{exception.inspect} occured during running generator #{generator_set.inspect}\n#{exception.backtrace.join("\n")}"
    end
  end
end

<MSG> Fixed few bugs

<DFF> @@ -38,6 +38,7 @@ when "startflat"
   create(stubs_dirs, "flat.rb", "#{ARGV[1]}.rb")
 when "-i"
   require "rango"
+  Rango.boot
 else
   puts "Unknown command: #{command}"
 end
\ No newline at end of file

Fixed few bugs