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

env_stylesheet_link_tag set link domain instead of root / #828

Closed
xiaopow opened this issue May 1, 2017 · 4 comments
Closed

env_stylesheet_link_tag set link domain instead of root / #828

xiaopow opened this issue May 1, 2017 · 4 comments
Labels

Comments

@xiaopow
Copy link

xiaopow commented May 1, 2017

Trying to use prerender.io to prerender our react on rails site. Since the stylesheet source link is set to root /, not the actual domain. Prerender will raise 404 when fetching stylesheet application_static.

/assets/application_static-31529a67d8ed4a81528e59c922580fd618e5dd227a3f3bb2dd5c4983151421ef.css Failed to load resource: the server responded with a status of 404 (Not Found)

You can see the 404 on http://service.prerender.io/https://www.altcademy.com/documents/

Is there anyway we can set the stylesheet link to the actual domain so it can be fetched?

@justin808
Copy link
Member

@xiaopow Can you try out #822, the webpacker support? This should have what you need.

7.1.0.beta.3

@xiaopow
Copy link
Author

xiaopow commented May 1, 2017

Hi @justin808, thank you for replying. I figured we can set this in config/environments/production.rb

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
  config.action_controller.asset_host = ENV['URL']

@justin808
Copy link
Member

@xiaopow can we close this issue?

@xiaopow
Copy link
Author

xiaopow commented May 2, 2017

Yup.

@xiaopow xiaopow closed this as completed May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants