Displaying 20 results from an estimated 1300 matches similar to: "stylesheet_link_tag, javascript_include_tag, caching problems"
2011 Oct 25
0
Sprocket Digest + Debug combination broken?
Hi all,
we''re just in the process of upgrading to the new asset pipeline, but I''m
having an annoying issue with Sprockets.
It turns out that I can''t enable both *debug* and *digest* in development
mode. When I do, I get a Errno::ENAMETOOLONG because the digest becomes the
*entire* *content* of the file instead of a hex. I get this with both sass
and javascript.
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so:
# ApplicationController.rb
protected
def render_optional_error_file(status_code)
render :template => "errors/500", :status => 500, :layout => ''application''
end
However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
2012 Mar 01
1
help stylesheet_link_tag
I was reading the book "Agile Web Development with Rails 4th Edition".
In Chapter 11, Iteration C2: Adding a Page Layout
1 <!DOCTYPE html>
- <html>
- <head>
- <title>Pragprog Books Online Store</title>
5 <%= stylesheet_link_tag "scaffold" %>
- <%= stylesheet_link_tag "depot", :media => "all" %>
- <%=
2006 Mar 18
3
Weird stylesheet_link_tag issue after moving servers
Dear experts,
I am in the process of switching servers for my application.
Before the move everything was working properly.
After the move
<%= stylesheet_link_tag ''/stylesheets/styles.css'' %>
generates
<link href="//stylesheets/styles.css" media="screen" rel="Stylesheet" type="text/css" />
2007 Oct 05
9
Rearchitect the new :cache feature of javascript_include_tag, similar to ToolbawksPacker
I have done some work with the javascript and stylesheet helpers for
ToolbawksPacker..
http://svn.toolbawks.com/toolbawks_packer/trunk/
Which more/less takes all executed javascript_include_tags and
stylesheet_link_tag on any converged view (combines all partials and such)
and builds a list of js and css files respectively and uses that to form a
cache. In additon, it also minifies the JS using
2007 Jun 17
1
actionmailer & picture
Hello
I''m using action mailer to create an HMTL outbound email. This email
renders a partial. In that partial, a call is made to a public location
to get a picture for display in the email.
When this email is generate, I get the following error (note: I''m sure
it has something to do with not understanding the context of
actionmailer and how it functions):
NoMethodError in
2010 Jun 14
2
stylesheet_link_tag
I know that the following statement loads the scaffold stylesheet, but
what exactly does stylesheet_link_tag do here?
<%= stylesheet_link_tag ''scaffold'' %>
Thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Aug 04
2
how to remove ID from stylesheet_link_tag?
When I use stylesheet_link_tag, the results come back with a timestamp
ID, like this:
<link href="/stylesheets/style.css?1154009736" media="screen"
rel="Stylesheet" type="text/css" />
I don''t want the query string and ID on the end, but I can''t see how to
disable this in the docs. How do I do this?
thanks,
jeff
--
Posted via
2006 Jul 25
1
Battle of Namings: stylesheet_link_tag vs link_to_javascript
Link helper namings counterintuitive in an environment where convention over
configuration prevails:
<%= link_to_javascript ''myscript'' %>
<%= stylesheet_link_tag ''mystyle'' %>
A simple def in ActionView::Helpers::AssetTagHelper would fix things in a
nice, backward-compatible way, such that:
<%= link_to_javascript
2007 Dec 01
3
Rails 2 problem with compute_public_path
I''m trying to migrate to Rails 2, but keep getting these errors all
over the place:
ActionView::TemplateError: wrong number of arguments (2 for 3)
On line #61 of users/new.rhtml
58: <% if @captcha_error -%><div class="fieldWithErrors"><
% end -%>
59: <table class="signup"><tr>
60: <td
2008 Oct 31
2
Stubbing #javascript_include_tag in a helper spec
When writing specs for a helper method, how do you set an expectation
for #javascript_include_tag ?
describe NeighbourhoodsHelper do
describe ''#initialise_map'' do
it ''should include the "foo" JS file'' do
# expectation here
helper.foobar
end
end
end
I''ve tried replacing "# expectation here" with the
2006 Mar 28
1
stylesheet_link_tag and apache2
On apache2, my rails application cannot access my stylesheet.
<%= stylesheet_link_tag ''my_railsblog_stylesheet'' %>
however, all is fine if I run my application on webrick!
why? Am I doing something wrong with my apache configuration:
# My Apache configuration
<VirtualHost 10.0.0.14:8091>
ServerName 10.0.0.14:8091
DocumentRoot /home/ac/railsblog/public/
2011 Sep 04
1
Linking failure in stylesheet_link_tag in production mode with asset pipeline enabled
Hey,
in my `application.html.erb`, I have this line:
<%= stylesheet_link_tag ''application'' %>
which should compile through the asset pipeline and link to the
application.css (which does a `require_tree .`). In development mode,
I''d expect a
<link ... href="/assets/application.css" />
This file is actually delivered by, for example, the
2006 Sep 26
0
Why does stylesheet_link_tag default to :media => 'screen' !?!?!
Hi all -
Can anyone tell me why stylesheet_link_tag defaults to :media => ''screen''
instead of ''all'' (or just leaving it out alltogether).
Seems odd since I would think by default I''d want my page printed out the
same way it looked on the screen...
Anyone know why that default was chosen?
-philip
2009 Dec 12
2
how to print out content of stylesheets in <style> tag via stylesheet_link_tag
Hi!
I''m developing facebook apps with ruby on rails. My connection is really
slow. The stylesheets do not load mosts of the time.
So i want to print out the content of my .css-files in <style> Tags. Is this
possibe with some parameter to the stylesheet_link_tag or an other tag?
Greetings from Germany
Klaus
--
You received this message because you are subscribed to the Google
2008 Feb 01
0
javascript_include_tag and controller actions
Hello folks,
I''d like to include the javascript generated by an RJS file in an
RHTML file using the <script></script> tags. I was going to use
javascript_include_tag to do this, mostly in order to ensure that the
contents are not cached by the browser.
Unfortunately, javascript_include_tag appends a ".js" to the file name
if there is not a period in the file name.
2008 Jun 13
1
asset_host and ssl pages problem
I am configuring assets hosts for our site but am running into problems
when navigating to an https page. Basically the server is trying to pull
the assests out on https:// rather than http:/ but i do not have https
configured on the assets server. I have dug around a bit and found this
bit of code which should when a page is https:// serve the assests from
the app server and when it is not https
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have:
ActionController::AbstractRequest.relative_url_root = "/foobar"
In my layout, I have:
<%= javascript_include_tag :defaults %>
Question 1:
I am getting an error:
ActionController::RoutingError (no route found to match
"/javascripts/prototype.js" with {:method=>:get}):
When I remove the relative_url_root, everything works great.
2011 Aug 10
3
javascript_include_tag error
<!DOCTYPE html>
<html>
<head>
<title><%= @title %></title>
<%= csrf_meta_tag %>
<%= javascript_include_tag
"http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js",
"jquery.rails.js"
%>
<script type="text/javascript">
...app/views/layouts/application.html.erb:7: syntax error, unexpected
2007 Jan 04
0
javascript_include_tag emits self-closing <script> tag
hello,
here is a sample rhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><%= javascript_include_tag :defaults %></head>
<body>test</body>
</html>
the