Rails 3.2.11 JavaScript properties stuck in loop on page load in browser

Locally, when I install the rails ( rails s

) project and view my log file, I can initially see my javascript resources load just fine

Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-02-04 09:46:56 -0600
Served asset /jquery.js - 304 Not Modified (26ms)

      

But for some reason the assets start trying to reload themselves and this is the result of the reload:

Started GET "/assets/jquery.js?body=1&_=1359992817255" for 127.0.0.1 at 2013-02-04 09:46:57 -0600
Served asset /jquery.js - 200 OK (0ms)

      

I can't figure it out and nothing has changed in my application to trigger this. Does anyone else have this problem?

Also, this is my GemFile:

source 'https://rubygems.org'

gem 'rails', '3.2.11'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2'
gem 'devise'
gem 'omniauth', '1.1.0'
gem 'omniauth-oauth2', '1.0.1'
gem 'carrierwave'
gem 'fog'
gem 'mini_magick' #need to install imagemagick for this to work
gem 'therubyracer'
gem 'execjs'
gem 'activeadmin'
gem 'meta_search', '>= 1.1.0.pre'
gem 'awesome_print'
gem 'aws-s3', :require => 'aws/s3'
gem "friendly_id", "~> 4.0.1"
gem 'feedzirra'
gem 'rabl'
gem 'bigdecimal'
gem 'rails_autolink'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
    gem "bootstrap-sass", '~> 2.0.4.0'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platform => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# Use unicorn as the app server
# gem 'unicorn'
gem 'thin'

# Deploy with Capistrano
gem 'capistrano'
gem "typhoeus"
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
gem "gibbon"

group :development, :test do 
  gem "rspec-rails", ">= 2.5.0"
  gem "capybara", ">= 0.4.1.2"
  gem "launchy", ">= 0.4.0"
  gem "database_cleaner", ">= 0.6.7"
  gem "factory_girl_rails", ">= 1.2"
  gem 'spork-rails'
  gem 'guard-rspec'
  gem 'guard-spork'
  gem 'guard-livereload'
  gem 'growl'
  group :darwin do
    gem 'rb-fsevent', :require => false
  end
end

group :test do
  gem "cucumber-rails", ">= 0.4.1"
end

      

This problem started after I updated to the latest version of Rails

+3


source to share


1 answer


The solution was that it turned out to be a wrong jQuery regex.



0


source







All Articles