简体   繁体   中英

Rails 3.1 sub uri assets path issue

I am currently using rails 3.1.0.rc1 and when i deploy it to a server which is using passenger and it is deployed to a suburi.

But when I go into look at the site, path to the style-sheets and java-script files are not being included because of the path.

Can someone let me know how to specify the path in the environments so that all the assets (images, style-sheets and java-script ) point to the right path?

This issue was fixed on Rails 3.1.0.rc4. You no need to specify anything for the config.assets.prefix unless you want the change the default /assets.

I got around it using YourApp::Application.config.assets.prefix = "/suburi/assets". Acording to issue #1489 , helpers didn't respect this till last Tuesday, so you'll have to use 3.1rc4. Url's seem to get created correctly, so it may be more of a phusion problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM