I had a problem when I tried to upgrade from Rails 3.0 + Jammit to Rails 3.1 Asset Pipeline. I created app/assets folder, under it I have both javascripts/application.js.coffee and stylesheets/ application.css.scss. I included both using stylesheet_link_tag and javascript_include_tag, but it just could not load the CSS correctly. The application keeps trying to load css from /stylesheets/ application.css which is a 404 error (the js loads fine from assets/ application.js). I am using the latest rails 3.1.1 and other libraries. So what is the problem here? Thanks! -- 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.
what''s the content of your application.js application.css ? btw seems you don''t need .css.scss extension, can write only .scss On Nov 21, 4:09 pm, Ben <benzhe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I had a problem when I tried to upgrade from Rails 3.0 + Jammit to > Rails 3.1 Asset Pipeline. I created app/assets folder, under it I have > both javascripts/application.js.coffee and stylesheets/ > application.css.scss. I included both using stylesheet_link_tag and > javascript_include_tag, but it just could not load the CSS correctly. > The application keeps trying to load css from /stylesheets/ > application.css which is a 404 error (the js loads fine from assets/ > application.js). I am using the latest rails 3.1.1 and other > libraries. So what is the problem here? > > Thanks!-- 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.
The content in application.css.scss is /* *= require_self *= require_tree . */ The application.js.coffee is #= require jquery I am simply just to test out the new asset pipeline. As I said the application has no problem to load application.js, but it just cannot find the correct location of application.js (keeps loading / stylesheets/application.css instead of /assets/application.css) On Nov 22, 12:54 am, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote:> what''s the content of your application.js application.css ? > > btw seems you don''t need .css.scss extension, can write only .scss > > On Nov 21, 4:09 pm, Ben <benzhe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > I had a problem when I tried to upgrade from Rails 3.0 + Jammit to > > Rails 3.1 Asset Pipeline. I created app/assets folder, under it I have > > both javascripts/application.js.coffee and stylesheets/ > > application.css.scss. I included both using stylesheet_link_tag and > > javascript_include_tag, but it just could not load the CSS correctly. > > The application keeps trying to load css from /stylesheets/ > > application.css which is a 404 error (the js loads fine from assets/ > > application.js). I am using the latest rails 3.1.1 and other > > libraries. So what is the problem here? > > > Thanks!-- 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.
In your config/application.rb do you have config.assets.enabled = true and in the config/environments/development.rb have config.assets.compress = false config.assets.debug = true I had a similar issue but forgot to add all this stuff. After adding it, mine started working Hope that helps, ~Jeremy -- Posted via http://www.ruby-forum.com/. -- 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.
Hi, Jeremy, I have all these set up correctly. That is why the JS part is working, but the CSS part just does not work at all. It is really frustrating for me. Thanks a lot for your help anyway! On Nov 22, 1:49 am, Jeremy Woertink <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> In your config/application.rb do you have > > config.assets.enabled = true > > and in the config/environments/development.rb have > > config.assets.compress = false > config.assets.debug = true > > I had a similar issue but forgot to add all this stuff. After adding it, > mine started working > > Hope that helps, > ~Jeremy > > -- > Posted viahttp://www.ruby-forum.com/.-- 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.
Is it rails 3.1.1 or 3.1.2 ? Did you change the config.assets.prefix at all? Is there still a stylesheets folder in your public folder? I actually have no idea at this point, so I''m hoping to spark something that allows you to figure it out :) -- Posted via http://www.ruby-forum.com/. -- 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.
It is Rails 3.1.1. I use default for config.assets.prefix I removed stylesheets folder from public folder though. On Nov 22, 4:06 am, Jeremy Woertink <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Is it rails 3.1.1 or 3.1.2 ? Did you change the config.assets.prefix at > all? Is there still a stylesheets folder in your public folder? > > I actually have no idea at this point, so I''m hoping to spark something > that allows you to figure it out :) > > -- > Posted viahttp://www.ruby-forum.com/.-- 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.
Anyone has a good idea about the problem? I am really stuck on this one. Thanks! On Nov 22, 11:35 am, Ben <benzhe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It is Rails 3.1.1. > I use default for config.assets.prefix > I removed stylesheets folder from public folder though. > > On Nov 22, 4:06 am, Jeremy Woertink <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > > > > > > > Is it rails 3.1.1 or 3.1.2 ? Did you change the config.assets.prefix at > > all? Is there still a stylesheets folder in your public folder? > > > I actually have no idea at this point, so I''m hoping to spark something > > that allows you to figure it out :) > > > -- > > Posted viahttp://www.ruby-forum.com/.-- 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.
+1 to this problem. I updated from 3.0.0 followed the instructions on the rails guides page for updating and have the exact same issue. I tried discussing it in a ticket but have not herd anything back. Did you find a fix for this? On Nov 22, 2:09 am, Ben <benzhe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I had a problem when I tried to upgrade from Rails 3.0 + Jammit to > Rails 3.1AssetPipeline. I created app/assets folder, under it I have > both javascripts/application.js.coffee and stylesheets/ > application.css.scss. I included both usingstylesheet_link_tagand > javascript_include_tag, but it just could not load the CSS correctly. > The application keeps trying to load css from /stylesheets/ > application.css which is a 404 error (the js loads fine from assets/ > application.js). I am using the latest rails 3.1.1 and other > libraries. So what is the problem here? > > Thanks!-- 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.
Today I tried to replace jammit with asset pipeline in 3.1 again. This time I got much further, the app could server JS and images correctly from assets/ folder. But I was not able to make the CSS right. I used stylesheet_link_tag, but it kept serving CSS from /stylesheets/ instead of /assets/. Anyone has an idea about this problem? Thanks! On Dec 21 2011, 5:20 am, Stewart <stewart.mathe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> +1 to thisproblem. I updated from 3.0.0 followed the instructions on > the rails guides page for updating and have the exact same issue. I > tried discussing it in a ticket but have not herd anything back. Did > you find a fix for this? > > On Nov 22, 2:09 am, Ben <benzhe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > I had aproblemwhen I tried to upgrade from Rails 3.0 + Jammit to > > Rails 3.1AssetPipeline. I created app/assets folder, under it I have > > both javascripts/application.js.coffee and stylesheets/ > > application.css.scss. I included both usingstylesheet_link_tagand > > javascript_include_tag, but it just could not load the CSS correctly. > > The application keeps trying to load css from /stylesheets/ > > application.css which is a 404 error (the js loads fine from assets/ > > application.js). I am using the latest rails 3.1.1 and other > > libraries. So what is theproblemhere? > > > Thanks!-- 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.