Ok, so compiling my assets works fine, but when I run:
thin start -e production
none of my javascript or css is loading. My browser also cancels requests for my assets. I'm not sure why this is so, but I suspect because he thinks about them. If you look at the top image, you will see that my application.css file has been compiled and saved in my resources folder, but when I try to access the file, I get a 404.html file.
What gives!?


Edit:
I was invited to publish my opinion. Here are some of the code in the project:
<% content_for :title, 'Quick Quote' %> <% content_for :subtotal, get_subtotal %> <% content_for :stylesheet_includes do %> <%= stylesheet_link_tag "quote", "jquery-ui-timepicker-addon" %> <% end %> <% if @quote.errors.any? %> <div class="flash alert"> <% @quote.errors.full_messages.each do |msg| %> <div><%= msg %></div> <% end %> </div> <% end %> <h1>Quick Quote</h1>
my layout:
<!DOCTYPE html> <html> <head> <title><%= (yield(:title) + " - " unless yield(:title).blank?).to_s + "Online Scheduler Order Taker" %></title> <%= stylesheet_link_tag "application", "jquery-ui-timepicker-addon.css", :media => "all" %> <%= yield :stylesheet_includes %> <%= javascript_include_tag "application" %> <%= yield :javascript_includes %> <%= csrf_meta_tags %> </head> <body>
code in my production.rb
config.assets.precompile += %w( quote.css jquery-ui-timepicker-addon.css prices.css contact.css )
Top of my .css.scss.erb application:
my whole application.js file
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery_ujs //= require jquery-ui //= require jquery-ui-timepicker-addon.js //= require_tree .
DJTripleThreat
source share