2
ActionController::RoutingError (No route matches [GET] "/assets/angular.min.js.map"):
actionpack (4.1.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.1.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.0) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.0) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.0) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.0) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.0) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.0) lib/rails/engine.rb:514:in `call'
railties (4.1.0) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/home/test-user/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
/home/test-user/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
/home/test-user/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'


Rendered /home/test-user/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.1ms)
Rendered /home/test-user/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.2ms)
Rendered /home/test-user/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms)
Rendered /home/test-user/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (17.8ms)

application.js file

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require angular.min
//= require_tree .
4
  • I know that /assets/angular.min.js.map is not equal to /assets/angular.min.js, so do you have the file /assets/angular.min.js.map in your project? Commented Sep 23, 2014 at 8:21
  • I dont have /assets/angular.min.js.map, but I included /assets/javascripts/angular.min.js Commented Sep 23, 2014 at 8:26
  • That's why the error is happening. The code in the file /assets/angular.min.js is internally accessing the file /assets/angular.min.js.map. In most cases, you should be okay ignoring it. But, if this error is not letting your rails app run, then you must include the file in your project. It's available in compressed file available for download from angularjs.org. Commented Sep 23, 2014 at 8:32
  • github.com/hiravgandhi/angularjs-rails I think it's more than easy Commented Sep 23, 2014 at 9:00

2 Answers 2

3

If you wanted to include Angular.js Library in rails then it is best to use gem.

gem 'angularjs-rails'

angularjs-rails wraps the Angular.js library for use in Rails 3.1 and above. Assets will minify automatically during production.

in your application.js add this

//= require angular

If you desire to require (optional) Angular files, you may include them as well in your JavaScript manifest file (application.js). For example:

//= require angular-animate
//= require angular-resource

For your reference https://github.com/hiravgandhi/angularjs-rails

Sign up to request clarification or add additional context in comments.

Comments

1

Finally I found the solution https://shellycloud.com/blog/2013/10/how-to-integrate-angularjs-with-rails-4

of course, gem 'angularjs-rails' is one of other possibility

1 Comment

got a 404 on that link you shared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.