Asset Pipeline Not working in production mode

Hi,

This is my application.js

/*
   *= require_self
*= require_tree .

*/

And I'm calling it in layout as <%= javascript_include_tag "application"
%>

and it is working perfectly in development mode.

But after doing rake assets:precompile, javascripts not working in
production env.

I have many other javascripts like sprytabbedpanels, jquery simplemodal,
jquery rotate etc.

But those are not working in production mode. I have given everything to
true in my config/environments/production.rb. But still not luck.

Kindly help me to resolve this issue.

Thanks & regrds,
Avantec

What is the log?

I'm getting like this.

Started GET "/assets/default-29f3ac14573e3f12dbc548f8ddfd2539.css" for
127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /default-29f3ac14573e3f12dbc548f8ddfd2539.css - 200 OK
(0ms)

Started GET "/assets/application-ac0727cff827eda05de7885e72c3d785.js"
for 127.0.0.1 at 2012-05-28 18:48:13 +0530

Served asset /application-ac0727cff827eda05de7885e72c3d785.js - 200 OK
(433ms)

Started GET "/jquery.enumerable.js" for 127.0.0.1 at 2012-05-28 18:48:13
+0530

ActionController::RoutingError (No route matches [GET]
"/jquery.enumerable.js"):
  actionpack (3.2.3)
lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.3)
lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in
`call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.3)
lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.3) lib/rails/engine.rb:479:in `call'
  railties (3.2.3) lib/rails/application.rb:220:in `call'
  rack (1.4.1) lib/rack/content_length.rb:14:in `call'
  railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
  rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
  /home/abhilash/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in
`service'
  /home/abhilash/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in
`run'
  /home/abhilash/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in
`block in start_thread'

Started GET "/assets/main_menu-32c3030c98e5467d7b6576b62628d666.css" for
127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /main_menu-32c3030c98e5467d7b6576b62628d666.css - 200 OK
(0ms)
Creating scope :page. Overwriting existing method DmcaForm.page.

Started GET "/assets/fileuploader-605078d1c41ade9432c60fac9503e43d.js"
for 127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /fileuploader-605078d1c41ade9432c60fac9503e43d.js - 200 OK
(0ms)

Started GET
"/assets/upload_drag_drop-1822bb96034488fe891690aa5d03d648.js" for
127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /upload_drag_drop-1822bb96034488fe891690aa5d03d648.js - 200
OK (0ms)

Started GET "/assets/main_menu-32c3030c98e5467d7b6576b62628d666.css" for
127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /main_menu-32c3030c98e5467d7b6576b62628d666.css - 200 OK
(0ms)
Creating scope :page. Overwriting existing method DmcaForm.page.

Started GET "/assets/fileuploader-605078d1c41ade9432c60fac9503e43d.js"
for 127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /fileuploader-605078d1c41ade9432c60fac9503e43d.js - 200 OK
(0ms)

Started GET
"/assets/upload_drag_drop-1822bb96034488fe891690aa5d03d648.js" for
127.0.0.1 at 2012-05-28 18:48:13 +0530
Served asset /upload_drag_drop-1822bb96034488fe891690aa5d03d648.js - 200
OK (0ms)

I'm getting fileuploader, upload_drag_drop etc, but not getting other
javascripts.

Thanks,
Avantec

Fernando Almeida wrote in post #1062381:

Your code is using /jquery.enumerable.js, i think that should to be /assets/jquery.enumerable.js

Thanks for the reply Fernando.

I have added jquery.enumerable.js

now it is showing

Started GET "/assets/application-d31d321cf8bd7c61b6c6d01f3770971e.js"
for 127.0.0.1 at 2012-05-28 22:58:36 +0530
Compiled jquery.js (0ms) (pid 22994)
Compiled jquery_ujs.js (0ms) (pid 22994)
Compiled Scrollbar-jquery.min.js (1ms) (pid 22994)
Compiled SpryTabbedPanels.js (0ms) (pid 22994)
Compiled ZeroClipboard.js (0ms) (pid 22994)
Compiled jquery-ui.js (55ms) (pid 22994)
Compiled active_admin/application.js (0ms) (pid 22994)
Compiled active_admin/base.js (73ms) (pid 22994)
Compiled active_admin.js (79ms) (pid 22994)
Compiled ajax-form-submit.js (0ms) (pid 22994)
Compiled drag_file.js (0ms) (pid 22994)
Compiled endless_page.js (0ms) (pid 22994)
Compiled fileuploader.js (1ms) (pid 22994)
Compiled iepngfix_tilebg.js (0ms) (pid 22994)
Compiled index-page-animation.js (0ms) (pid 22994)
Compiled jquery-1.7.1.min.js (1ms) (pid 22994)
Compiled jquery-impromptu.4.0.min.js (0ms) (pid 22994)
Compiled jquery-ui-1.8.17.custom.min.js (1ms) (pid 22994)
Compiled jquery.enumerable.js (0ms) (pid 22994)
Compiled jquery.gallery.js (0ms) (pid 22994)
Compiled jquery.jalert.packed.js (0ms) (pid 22994)
Compiled jquery.purr.js (0ms) (pid 22994)
Compiled jquery.rotate.1-1.js (0ms) (pid 22994)
Compiled jquery.simplemodal.js (0ms) (pid 22994)
Compiled jquery.tablesorter.min.js (0ms) (pid 22994)
Compiled jquery.tablesorter.pager.js (0ms) (pid 22994)
Compiled jquery.zclip.js (0ms) (pid 22994)
Compiled jquery.zclip.min.js (0ms) (pid 22994)
Compiled menuclick.js (0ms) (pid 22994)
Compiled popup-handler.js (0ms) (pid 22994)
Compiled scrollbar-jquery-ui.min.js (1ms) (pid 22994)
Compiled scrollbar-jquery.mousewheel.min.3.0.6.js (0ms) (pid 22994)
Compiled share.js (0ms) (pid 22994)
Compiled slideshow.js (0ms) (pid 22994)
Compiled swfobject.js (0ms) (pid 22994)
Compiled upload_drag_drop.js (0ms) (pid 22994)
Compiled vertical.slider.standard.js (49ms) (pid 22994)
Compiled application.js (464ms) (pid 22994)
Served asset /application-d31d321cf8bd7c61b6c6d01f3770971e.js - 200 OK
(17904ms)

that means compiling all the js files.

But still I'm getting

Spry is undefined
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");

but this is defined in SpryTabbedPanels.js.

Regards,
Avantec

The order that the files are loaded is not influencing?