I am trying to implement a admin namespace into my web application .It is working fine on my local machine but when I am trying to deploy the application none of my css is working.
I tried
rake assets:precompile
I have restarted the server .My structure looks like this
-
app
-
assets
-
stylesheets
. application.css
-
admin
- my_admin.css
-
-
-
The same structure is with Javascripts.In my layout file I have used
<%= stylesheet_link_tag "admin/my_admin" %>
<%= javascript_include_tag "admin/my_admin" %>
When I run my application it works fine but none of my css nor javascript is there ..In my Browser inspector it is saying my_admin css and javascript not found.Any help??
In production you likely have
in your
config/environment/production.rb. This prevents the asset pipeline from compiling scripts on demand in production as it does in development.You need to specify any
.jsor.cssassets you want precompiled which are notapplication.jsorapplication.css.Adding the following to your
config/environment/production.rband running
rake assets:precompileshould put those compiled assets intopublic/assetsfor you.