It works in development mode, but show me the error ActionController::RoutingError (No route matches [GET] "/lenord-single-page-theme/js/custom.js"):in production mode.
Before starting the rails server, I started RAILS_ENV=production rake assets:precompile --trace
I added two resource folders under the provider
in the application.rbfile, I insert the line
config.assets.paths << "#{Rails.root}/vendor/themes"
And changed config.serve_static_assetstotrue
+++ b/config/environments/production.rb
@@ -20,7 +20,7 @@ DqaStreesfulServer::Application.configure do
- config.serve_static_assets = false
+ config.serve_static_assets = true
Folder structure
vendor
βββ assets
β βββ javascripts
β βββ stylesheets
βββ themes
βββ ace-admin-theme
β βββ avatars
β βββ css
β βββ font
β βββ images
β βββ img
β βββ js
βββ lenord-single-page-theme
βββ css
βββ fonts
βββ img
βββ index.html
βββ js
βββ rs-assets
UPDATE
I reference my js file this way
welcome.html.haml
60: %script{src: asset_path("lenord-single-page-theme/js/custom.js")}
UPDATE
I think the problem may be in production.rb
I tried to collect all the files by adding this line to production.rb
config.assets.precompile += %w( vendor/themes/* )
And I started the server in working mode with a command rails s -e production, notnginx or apache
UPDATE
I got ActionView::Template::Error (Invalid CSS after "}": expected selector or at-rule, was "}"in production mode after I made the following changes.
AT ../../config/environments/production.rb
+ config.assets.compile = true
+ config.assets.precompile = [/^[-_a-zA-Z0-9]*\..*/]
+ config.assets.precompile += %w( *.js *.css )
I showed a tree structure between Wendel / theme / and the public / assets here
It is reasonable?
in the public / assets section
% tree lenord-single-page-theme (git)-[feature/prettier_form]
lenord-single-page-theme
βββ js
βββ application-dfabb3389cb2e71ba110a8589e5e106b.js
βββ application-dfabb3389cb2e71ba110a8589e5e106b.js.gz
//
lenord-single-page-theme
βββ css
β βββ animate.min.css
β βββ bootstrap.css
β βββ bootstrap.min.css
β βββ font-awesome.min.css
β βββ prettyPhoto.css
β βββ rs-settings-ie8.css
β βββ rs-settings.css
β βββ style.css
βββ fonts
β βββ FontAwesome.otf
β βββ fontawesome-webfont.eot
β βββ fontawesome-webfont.svg
β βββ fontawesome-webfont.ttf
β βββ fontawesome-webfont.woff
βββ img
β βββ 1.jpg
β βββ 10.jpg
β βββ 11.png
β βββ 12.jpg
β βββ 13.png
β βββ 2.jpg
β βββ 3.jpg
β βββ 4.png
β βββ 5.png
β βββ 6.png
β βββ 8.jpg
β βββ 9.jpg
β βββ aboutus.png
β βββ back-top.png
β βββ banner_1.jpg
β βββ banner_2.jpg
β βββ banner_3.jpg
β βββ blue-back.png
β βββ dummy.png
β βββ fback.png
β βββ portfolio
β β βββ 1.jpg
β β βββ 2.jpg
β β βββ 3.jpg
β β βββ 4.jpg
β β βββ 5.jpg
β β βββ 6.jpg
β β βββ 7.jpg
β β βββ 8.jpg
β β βββ 9.jpg
β β βββ tn1.jpg
β β βββ tn2.jpg
β β βββ tn3.jpg
β β βββ tn4.jpg
β β βββ tn5.jpg
β β βββ tn6.jpg
β β βββ tn7.jpg
β β βββ tn8.jpg
β β βββ tn9.jpg
β βββ prettyPhoto
β β βββ dark_rounded
β β β βββ btnNext.png
β β β βββ btnPrevious.png
β β β βββ contentPattern.png
β β β βββ default_thumbnail.gif
β β β βββ loader.gif
β β β βββ sprite.png
β β βββ dark_square
β β β βββ btnNext.png
β β β βββ btnPrevious.png
β β β βββ contentPattern.png
β β β βββ default_thumbnail.gif
β β β βββ loader.gif
β β β βββ sprite.png
β β βββ default
β β β βββ default_thumb.png
β β β βββ loader.gif
β β β βββ sprite.png
β β β βββ sprite_next.png
β β β βββ sprite_prev.png
β β β βββ sprite_x.png
β β β βββ sprite_y.png
β β βββ facebook
β β β βββ btnNext.png
β β β βββ btnPrevious.png
β β β βββ contentPatternBottom.png
β β β βββ contentPatternLeft.png
β β β βββ contentPatternRight.png
β β β βββ contentPatternTop.png
β β β βββ default_thumbnail.gif
β β β βββ loader.gif
β β β βββ sprite.png
β β βββ light_rounded
β β β βββ btnNext.png
β β β βββ btnPrevious.png
β β β βββ default_thumbnail.gif
β β β βββ loader.gif
β β β βββ sprite.png
β β βββ light_square
β β βββ btnNext.png
β β βββ btnPrevious.png
β β βββ default_thumbnail.gif
β β βββ loader.gif
β β βββ sprite.png
β βββ product.png
β βββ service
β β βββ 11.png
β β βββ 12.png
β β βββ 21.png
β β βββ 22.png
β β βββ 31.png
β β βββ 32.png
β β βββ 41.png
β β βββ 42.png
β βββ service.png
β βββ vast.jpg
β βββ vivotek_square_icon.jpg
β βββ vvtk_sd.jpg
β βββ wood-back.png
βββ index.html
βββ js
β βββ application.js
β βββ bootstrap.js
β βββ bootstrap.min.js
β βββ custom.js
β βββ gmaps.js
β βββ html5shiv.js
β βββ jquery.arbitrary-anchor.js
β βββ jquery.js
β βββ jquery.knob.js
β βββ jquery.prettyPhoto.js
β βββ jquery.themepunch.plugins.min.js
β βββ jquery.themepunch.revolution.min.js
β βββ respond.min.js
β βββ waypoints.min.js
βββ rs-assets
βββ arrow_large_left.png
βββ arrow_large_right.png
βββ arrow_left.png
βββ arrow_left2.png
βββ arrow_right.png
βββ arrow_right2.png
βββ arrowleft.png
βββ arrowright.png
βββ arrows.psd
βββ black50.png
βββ boxed_bgtile.png
βββ bullet.png
βββ bullet_boxed.png
βββ bullets.png
βββ bullets.psd
βββ bullets2.png
βββ coloredbg.png
βββ grain.png
βββ large_left.png
βββ large_right.png
βββ loader.gif
βββ loader2.gif
βββ navigdots.png
βββ navigdots_bgtile.png
βββ shadow1.png
βββ shadow2.png
βββ shadow3.png
βββ small_arrows.psd
βββ small_left.png
βββ small_left_boxed.png
βββ small_right.png
βββ small_right_boxed.png
βββ timer.png
βββ timerdot.png
βββ transparent.jpg
βββ white50.png
14 directories, 154 files