My page doesn''t load css and images in production mode. For css I get a path like "/appname/assets/...". What''s wrong? Should be without appname. I tried the config.assets.paths but no luck. My app runs on fcgi (if that could mean anything) on the production server. Locally I use passenger and have no problem. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/30062dfa9ed655dcca69aa5f11b58255%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
One more thing. The host has a www directory. When using rails the app is in another directory with a .htaccess and a RewriteRule in www pointing to the rails app and dispatch.fcgi. Could it be a problem with that? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2d1d600248e88cacbe772367d8d5df7e%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Additional question. Should I run "RAILS_ENV=production bundle exec rake assets:precompile" on the server? Must I do that each time I add a new asset, e g image or new css file? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45b2c6abc162a4610e7cea2f1278d323%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
I find that I do have to do this after every change at the server. I don''t need to include the environment, it seems to be a default somehow. rake assets:precompile is enough (I do run rvm on the server, so the bundle exec part is inferred as well). Walter On Jul 16, 2013, at 3:57 AM, Paul Bergstrom wrote:> Additional question. > > Should I run "RAILS_ENV=production bundle exec rake assets:precompile" > on the server? Must I do that each time I add a new asset, e g image or > new css file? > > -- > 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45b2c6abc162a4610e7cea2f1278d323%40ruby-forum.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/44D6B5F7-B3FF-4022-8D24-BC4389915D2A%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.
Walter Davis wrote in post #1115639:> I find that I do have to do this after every change at the server. I > don''t need to include the environment, it seems to be a default somehow. > rake assets:precompile is enough (I do run rvm on the server, so the > bundle exec part is inferred as well). > > WalterThank you. Good to know. Do you know how to solve wrong path for assets? Can I assign where root is in my environment? -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f5c4205d3924acd400181b9279179abe%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
On Jul 16, 2013, at 11:38 AM, Paul Bergstrom wrote:> Walter Davis wrote in post #1115639: >> I find that I do have to do this after every change at the server. I >> don''t need to include the environment, it seems to be a default somehow. >> rake assets:precompile is enough (I do run rvm on the server, so the >> bundle exec part is inferred as well). >> >> Walter > > Thank you. Good to know. > > Do you know how to solve wrong path for assets? Can I assign where root > is in my environment?I don''t, and I hope someone else can, for both our sakes! Walter> > -- > 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f5c4205d3924acd400181b9279179abe%40ruby-forum.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/402CA5D6-30F4-4B7A-8614-E14E7C823FB9%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.
there is a rails_root helper. but it is depreciated. check out this http://stackoverflow.com/questions/9192795/rails-root-not-longer-valid-when-loading-images-with-the-prawnto-2-gem On Tuesday, July 16, 2013 8:38:24 AM UTC-7, Ruby-Forum.com User wrote:> > Walter Davis wrote in post #1115639: > > I find that I do have to do this after every change at the server. I > > don''t need to include the environment, it seems to be a default somehow. > > rake assets:precompile is enough (I do run rvm on the server, so the > > bundle exec part is inferred as well). > > > > Walter > > Thank you. Good to know. > > Do you know how to solve wrong path for assets? Can I assign where root > is in my environment? > > -- > 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/12c5d5ae-727c-44f4-8d7f-7bc26429f045%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Not sure the solution is in here but https://www.altamiracorp.com/blog/employee-posts/rails-3 Didn''t work for me. I really need a solution to the path problem :-) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c8daf6af0b821f68a721468546df9c12%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.