# This script is designed to be used with Ruby on Rails' new project generator: # # rails new my_app -m http://emberjs.com/template.rb # # For more information about the template API, please see the following Rails # guide: # # http://edgeguides.rubyonrails.org/rails_application_templates.html run "rm public/index.html" # Install required gems gem "active_model_serializers" gem_group :assets do gem "ember-rails", github: "emberjs/ember-rails" end run "bundle install" # This needs to be done outside the bootstrap generator # to avoid an initial "unknown variant" error. environment <<-RUBY.strip_heredoc, :env => :development config.ember.variant = :development RUBY environment <<-RUBY.strip_heredoc, :env => :test config.ember.variant = :development RUBY environment <<-RUBY.strip_heredoc, :env => :production config.ember.variant = :production RUBY # Configure the app to serve Ember.js and app assets from an AssetsController generate "ember:bootstrap" generate "ember:install", "--head" generate :controller, "Assets", "index" run "rm app/views/assets/index.html.erb" file 'app/views/assets/index.html.erb', <<-CODE