Hi there, So I am using Rails 3.1.0 in production. However the asset link that is produced is: <link type="text/css" rel="stylesheet" media="screen" href=" /stylesheets/application.css"> Instead of: <link type="text/css" rel="stylesheet" media="screen" href=" /assets/application-md5hash.css"> 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. -- @jpartogi -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Do you have config.assets.enabled = true in your application.rb or elsewhere, and config.assets.digest = true In your production.rb? -GR On Sep 8, 2011, at 9:56 AM, Joshua Partogi wrote:> Hi there, > > So I am using Rails 3.1.0 in production. However the asset link that is produced is: > <link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/application.css"> > > Instead of: > <link type="text/css" rel="stylesheet" media="screen" href="/assets/application-md5hash.css"> > > 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. > > > -- > @jpartogi > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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! On Sep 8, 9:00 am, Greg Reinacker <gr2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Do you have > > config.assets.enabled = true > > in your application.rb or elsewhere, and > > config.assets.digest = true > > In your production.rb? > > -GR > > On Sep 8, 2011, at 9:56 AM, Joshua Partogi wrote: > > > > > > > > > Hi there, > > > So I am using Rails 3.1.0 in production. However the asset link that is produced is: > > <link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/application.css"> > > > Instead of: > > <link type="text/css" rel="stylesheet" media="screen" href="/assets/application-md5hash.css"> > > > 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. > > > -- > > @jpartogi > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. On Sep 9, 4:31 pm, Irish <supair...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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! > > On Sep 8, 9:00 am, Greg Reinacker <gr2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Do you have > > > config.assets.enabled = true > > > in your application.rb or elsewhere, and > > > config.assets.digest = true > > > In your production.rb? > > > -GR > > > On Sep 8, 2011, at 9:56 AM, Joshua Partogi wrote: > > > > Hi there, > > > > So I am using Rails 3.1.0 in production. However the asset link that is produced is: > > > <link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/application.css"> > > > > Instead of: > > > <link type="text/css" rel="stylesheet" media="screen" href="/assets/application-md5hash.css"> > > > > 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. > > > > -- > > > @jpartogi > > > > -- > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.