Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets don't correctly load if rails_port is installed in subdirectory #364

Closed
apmon opened this issue Jul 20, 2013 · 2 comments
Closed

Comments

@apmon
Copy link
Member

apmon commented Jul 20, 2013

The construction of urls in javascript files for images in the asset pipeline do not create correct URLs if the rails_port app is installed in a sub-directory on the server.

For example when running a branch of the rails_port in a subdirectory of ones home directory on the dev server like http://apmon.dev.openstreetmap.org/facebook-login the javascript tries to load images from http://apmon.dev.openstreetmap.org/assets/ rather than http://apmon.dev.openstreetmap.org/facebook-login/assets

@tomhughes
Copy link
Member

I don't think this is something that is ours to control - you probably need to google for what config magic to add to your environment.rb to tell rails what you are doing.

@apmon
Copy link
Member Author

apmon commented Jul 24, 2013

Yes, you are right, some config magic fixed it. Thanks.

You need to specify the directory while precompiling the assets.

e.g. RAILS_RELATIVE_URL_ROOT='/facebook-login'; rake assets:precompile

@apmon apmon closed this as completed Jul 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants