title: Angularjs in rails: angularjs javascripts don't load
body: <p>I want use angularjs in rails. for this, I want deactive rails view and just use angularjs html file. I use <code>angular-resource.min.js</code> for routing the url and then I create <code>index</code> action in my <code>application_controller</code> for deactiving the rails views. Rails view are deactive now, but none of scripts and angular file run in project and when server is start, I see a blanck page, html of this page is empty and javascripts doesn't load in page.</p>
  
  <p>I have below code in this project:</p>
  
  <p><code>Forums_controller.rb</code>:</p>
  
  <pre><code>class ForumsController &lt; InheritedResources::Base
    respond_to :json
  end
  </code></pre>
  
  <p><code>comments_controller.rb</code>:</p>
  
  <pre><code>class CommentsController &lt; InheritedResources::Base
    belongs_to :forum
    respond_to :json
  end
  </code></pre>
  
  <p><code>application_controller</code>:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery with: :exception
    def index
      render :layout =&gt; 'application', :nothing =&gt; true
    end
  end
  </code></pre>
  
  <p><code>config/rootes.rb</code>:</p>
  
  <pre><code>Simpleforum::Application.routes.draw do
    resources :forums, :defaults =&gt; {format: :json} do
      resources :comments, :defaults =&gt; {format: :json}
    end
    root to: 'application#index'
  end
  </code></pre>
  
  <p>And I add all angularjs requirements to assets folder.</p>
  
  <p>I use this gem:</p>
  
  <pre><code>gem 'inherited_resources'
  gem 'bootstrap-sass'
  gem 'quiet_assets'
  gem 'angularjs-rails-resource', '~&gt; 1.1.1'
  </code></pre>
  
  <p><code>angularjs app controller</code>:</p>
  
  <p><code>app.js.erb</code>:</p>
  
  <pre><code>'use strict';
  angular.module('app', ['ngResource'])
          .config(['$routeProvider', function($routeProvider, $locationProvider) {
              $routeProvider
                      .when('/',          {controller: 'ForumIndexController',    templateUrl: '&lt;%= asset_path('templates/index.html') %&gt;'})
                      .when('/forum/new', {controller: 'ForumCreateController',   templateUrl: '&lt;%= asset_path('templates/new.html') %&gt;'})
                      .when('/forum/:id', {controller: 'ForumShowController',     templateUrl: '&lt;%= asset_path('templates/show.html') %&gt;'})
                      .otherwise({redirectTo: '/'});
          }
          ]);
  </code></pre>
  
  <p><code>application.js</code>:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require angularjs/rails/resource
  //= require angularjs/rails/resource/extensions/snapshots
  //= require angular.min
  //= require angular-resource.min
  //= require ../angular/app
  //= require_tree ../angular
  </code></pre>
  
  <p>Where is the problem? How can I fixed this error?</p>
  
  <p><code>Note</code>: I use <a href="http://dillonbuchanan.com/programming/ruby-on-rails-angularjs-resources/" rel="nofollow">this tutorial</a> for create this project.</p>