i am developing an app in rails with some css and js plugins template, by default we should separate or js and css file into javascript and css folder right?
but the problem is my plugins folder structure are quite complex, have a lot of sub folders, so i decided to put all the assets (css, js, images, fonts) into a folder, the problem is everything not working on production mode, the css styles, scripts, images all not loaded, please help.
here is my structure :
javascripts
stylesheets
public_assets
- img
- icon
- bg
- favicon
- images
- proteam
- png
- ualanding
- portofolio
- fullsize
- thumbnail
- font
- css
- js
- sass
- vendor
- ninja-slider
- bootstrap
- font
- css
- js
- font awesome
- css
- fonts
- less
- scss
- jquery
- magnific-popup
- scroolreveal
- vid
images
Static_Dev
FYI i already run
rake assets:precompile
command
i reference my images mostly like these :
<img alt="UrbanAce" src="assets/img/logo.png" height="24">
i believe when i run on production mode, the assets path changed, so i changed my image tag to :
<%= image_tag "logo.png", { src: "logo.png", height: "24"} %>
the above code did not work, even in development mode.
also, what if i need to call some background images from css? something like
.hero {
background-image: url("../img/png/UA-Landing/UA-Pattern.png");
background-repeat: repeat-x;
background-position: 0 76px;
height: 280px;
}
how should i replace it? so it will work on production and development mode.
many thanks....
Aucun commentaire:
Enregistrer un commentaire