1

Sprockets seems to make an error in determining the logical_path of my javascript assets (except for application.js). It prepends "../javascripts" to the path and so my references are wrong and the application.js file won't precompile. I'm using Rails Thin server on Windows.

Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.3'
gem 'eventmachine', '1.0.0.beta.4.1'
gem 'thin'
gem 'mysql'
gem 'win32-open3-19'
gem 'paperclip', '2.3.8'
gem 'jsmin'
gem 'will_paginate'
gem 'jquery-rails'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.5'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
end

I've created a new app and on it's own, there are no problems. It's only when I copy the files from my current app over that the problem starts. I've tried disabling all extraneous gems but the problem persists (leading me to believe it's not a gem that's causing the problem).

Richard Hulse
  • 10,383
  • 2
  • 33
  • 37
  • It sounds to me like you are missing some option in one of the config files. Check the end of asset pipeline guide for a list of the correct settings for a migrated app. – Richard Hulse Dec 14 '11 at 20:09
  • No, everything seems to be in order. Still getting this problem. I've even upgraded Ruby to 1.9.3 and reinstalled the rails gem for it. – SnakeWasTheNameTheyGaveMe Dec 14 '11 at 20:57

1 Answers1

3

Wow. Apparently Sprockets pukes invisible chunks when it finds a folder called "java" under "assets" and simply doesn't process anything else from that point forward for js files. Under /assets I had "images", "javascripts", "java" (for java applets) and "stylesheets". Changing "java" to "applets"

"FIXED"

the problem.