1
votes

I've got 3.1 application. At the beginning i'd added config.assets.enabled = false not to use pipeline.

Now i've commented this line. restart server.

I've got app\assets\javascripts\application.js

In my layout view I use: <%= javascript_include_tag "application" %>

my page tries to load "javascripts/application.js" not assets/application.js

What may be wrong in my configuration?

gemfile (unnecessary removed):

gem 'rails', '3.1.1'

gem 'sqlite3'

# Asset template engines
group :assets do
  gem 'sass-rails',   '~> 3.1.4'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
2
mind posting the contents of your gemfile?agmcleod

2 Answers

3
votes

Rather than commenting out the line, have you tried leaving it in and making it config.assets.enabled = true instead? It looks like the default value will always be false, so you need to explicitly set it to true.

0
votes

If you turn the pipeline off then the Rails helpers revert to the old paths to javascript and CSS - in those folders in the /public directory. If you don't want to use the pipeline then you have to use those folders instead, not the assets folder ones.

Dylan is correct - you have to explicitly enable the pipeline, and this is the default for a new generated app.