Asset link in production is incorrect

Hi there,

So I am using Rails 3.1.0 in production. However the asset link that is produced is:

Instead of:

I am using this config line in application.rb, which means my css is precompiled

Bundler.require *Rails.groups(:assets => %w(development test))

What am I missing here?

Thank you for your help.

Do you have

config.assets.enabled = true

in your application.rb or elsewhere, and

  config.assets.digest = true

In your production.rb?

-GR

I was having this same issue when upgrading a 2.3.12 app to 3.1 and
adding Greg's suggestion

config.assets.digest = true

to production.rb fixed it for me.

Thanks!

Thanks guys,

I think it is because I use this bit of line:
Bundler.require *Rails.groups(:assets => %w(development test))

I changed it to:
Bundler.require(:default, :assets, Rails.env)
and it works.