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 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?

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

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

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: