<NME> init.rb.rbt
<BEF> <% if defined?(JRUBY_VERSION) %>
<%= shebang rubypath, ["--1.9", "--disable-gems"] %>
<% else %>
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 the preresolved locked set of gems.
  require File.expand_path("../.bundle/environment", __FILE__)
rescue LoadError
  # Fallback on doing the resolve at runtime.
  require "rubygems"
  require "bundler"
  Bundler.setup
end
  abort "LoadError during loading gems/environment: #{exception.message}\nRun gem bundle to fix it."
end

require "rango/stacks/controller"

unless %w[test development stage production].include?(Rango.environment)
  abort "Unknown environment: #{Rango.environment}"
require "<%= @name %>"

Rango.boot

# Available arguments:
#   ./init.rb -i
Rango.boot

# environment-specific settings
require_relative "environments"

# register applications
require_relative "views.rb"

<MSG> StackController will be used in the stack generator

<DFF> @@ -1,3 +1,5 @@
+# encoding: utf-8
+
 <% if defined?(JRUBY_VERSION) %>
 <%= shebang rubypath, ["--1.9", "--disable-gems"] %>
 <% else %>
@@ -20,7 +22,8 @@ rescue LoadError => exception
   abort "LoadError during loading gems/environment: #{exception.message}\nRun gem bundle to fix it."
 end
 
-require "rango/stacks/controller"
+require "rango"
+require "rango/environments"
 
 unless %w[test development stage production].include?(Rango.environment)
   abort "Unknown environment: #{Rango.environment}"
@@ -33,7 +36,7 @@ Bundler.require_env(Rango.environment)
 Rango.boot
 
 # environment-specific settings
-require_relative "environments"
+require_relative "environments.rb"
 
 # register applications
 require_relative "views.rb"

StackController will be used in the stack generator