<% if RUBY_PLATFORM.eql?("java") %> <%= shebang rubypath, ["--1.9", "--disable-gems"] %> <% else %> <%= shebang rubypath, ["--disable-gems"] %> <% end %> # encoding: utf-8 # default encoding setup Encoding.default_internal = "utf-8" Encoding.default_external = "utf-8" # This file should set Rango environment # You can run your scripts with ./init.rb my-script.rb # See http://wiki.github.com/botanicus/rango/rango-boot-process # bundler begin require_relative "gems/environment.rb" rescue LoadError => exception abort "LoadError during loading gems/environment: #{exception.message}\nRun gem bundle to fix it." end require "rango" # we need to load dependencies before boot, so bootloaders will be called Rango.logger.info("Loading dependencies for #{Rango.environment}") Bundler.require_env(Rango.environment) Rango.boot $LOAD_PATH.unshift(File.expand_path("../lib", __FILE__)) require "<%= @name %>" # Available arguments: # ./init.rb -i # ./init.rb -i file # ./init.rb file Rango.parse(ARGV)