similar to: javascript_include_tag -- 500 internal server error

Displaying 20 results from an estimated 2000 matches similar to: "javascript_include_tag -- 500 internal server error"

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
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.
2010 Jun 02
1
Ajax with JQuery
I have used Ajax link and live validation in index.rhtml Ajax link requires JavaScript "prototype" and live validation requires "jquery". i got "element.dispatchEvent is not a function" on the firebug console when i used "prototype" and "jquery" in same page index.rhtml after i removed javascript "prototype" library, i got "Ajax is
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
2006 Dec 11
3
javascript_include_tag -- time stamp
Using, for example, <%= javascript_include_tag ''prototype'' %> results in <script src="/javascripts/prototype.js?1164912447" type="text/javascript"></script> I take it the number 1164912447 is the timestamp of the file (in seconds since the epoch) Isn''t it redundant to include this information? Isn''t part of the HTTP
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
2011 Oct 12
4
How to access controller's instance variable in a js.erb loaded by javascript_include_tag?
Hello! In rails 3.1 app I have a controller UsersController with ''show'' action. show.html.erb contains: <% content_for(:head) do %> <%= javascript_include_tag ''myscript'' %> <% end %> <p>Hello @user.name</p> And I have this in myscript.js.erb $jQuery(document).ready(function() { alert(<%= @user.name %>); }); @user is being
2009 Sep 01
0
Problem with "javascript_include_tag :all" tag.
Hello Friends, I m using auto_complete pluging for text_field. When using "javascript_include_tag :all" tag pagination is not working .. Anybody tell me what''s happen here ??? Thanx. -- Posted via http://www.ruby-forum.com/.
2008 Jun 02
0
stylesheet_link_tag, javascript_include_tag, caching problems
So, the new caching for stylesheet_link_tag, javascript_include_tag which rolls up the files into one all.js or all.css files is great ... however I''ve run into an issue: If all.cs or all.js don''t exist, they get generated ... great, I''ve reduced the number of gets ... The problem is what occurs when the files already exist ... even if I''ve changed my list of
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 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
Hello all, I am trying to implement a POC wherein I can post a message + image and get the same working via AJAX to display them both for each new entry without the page reloading. I am using a config of Ruby 1.8.7 and Rails 2.0.2 for project specific purposes.. I am also using a pretty old paperclip commit from github for this....I had to suit my proj config requirements mentioned previously..
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 Aug 09
3
javascript_include_tag - release number instead of time stamp
I''ve noticed that the major part of my pages'' load time is the Javascript for prototype and effects. Instead of forcing a reload per request (by attaching the ?timestamp parameter), I''d like to force reload this per release. Right now, I load the CSS and JS manually (without the Rails helpers) and just append a release number manually. It''s OK, but when I
2011 May 25
1
trouble using jQuery in Rails 3.0.7
I''ve tried to install JQuery a couple of times now, and I''ve followed the steps for Rails UJS mentioned here: https://github.com/rails/jquery-ujs The last time I went ahead and added jQuery UI as well: $ rails generate jquery:install --ui remove public/javascripts/prototype.js remove public/javascripts/effects.js remove public/javascripts/dragdrop.js
2008 Jun 01
1
Page loading popup
Ran into a strange problem with my app. Had branched off our development tree and made some significant modeling changes and some view changes here developing locally not through facebook. When I try to test the code through facebook now I''m getting a Facebook popup dialog on anypage I try to hit of our app that just says Loading. The JS error console shows Error: this.obj.parentNode
2012 Aug 29
7
custom js in rails project
Hello, I have a rails project with one controller and one action, as simple as posible. And I''m trying to put some custom css and js to my own index.html.erb (not public/index.html.erb), I inluded this on the layout file: layout file: <!DOCTYPE html> <html> <head> <title>Volei</title> <%= stylesheet_link_tag "application", :media =>
2010 Jul 12
1
newbie: what is preferred approach for including javascript files?
Hi, What is the cost of not cacheing javascript? If that cost is serious, do I prefer to selectively include javascript files only for view where they are needed? In other words I see four options: 1) Cache everything in layouts/application.html.erb and don''t worry about selective inclusion of .js files where they are needed; 2) cache some things in (e.g., dependencies like jquery) and
2006 Jan 25
3
Application Helper and Javascript
I have a "javascript_include_tag" including a Javascript function. I have a function being invoked via a helper in the same view, which prints out a script tag that uses the javascript function above. Problem is, the function being invoked via the helper can''t find the javascript function included in the "javascript_include_tag". I hardcoded the javascript that
2005 Dec 18
1
problems with text_field_with_autocomplete
I''m trying to set up a search field with autocomplete. I have verified that the server is called when I type a letter in the box, and that the handler creates the correct instance variable. However, I never see the partial that is supposed to be rendered. Here are the relevant files. I included their paths/names in case I am missing some nuance of the naming conventions.
2006 Jan 28
2
javascripts
Trying to use auto_complete_for which works fine on my home system. I see that when I use <%= javascript_include_tag "defaults" %> that when used, the webrick reports GET /javascripts/prototype.js GET /javascripts/dragdrop.js GET /javascripts/effects.js GET /javascripts/controls.js but on the system that I am trying to develop on and doing similarly, the webrick only reports