Problem with assets and path

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.

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?

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?

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

Walter D. 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?

On Jul 16, 2013, at 11:38 AM, Paul B. wrote:

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

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 :slight_smile:

there is a rails_root helper. but it is depreciated. check out
this