Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

FontAwesome files being looked for in the wrong place #1342

Closed
orenyk opened this issue Nov 8, 2015 · 2 comments
Closed

FontAwesome files being looked for in the wrong place #1342

orenyk opened this issue Nov 8, 2015 · 2 comments

Comments

@orenyk
Copy link
Contributor

orenyk commented Nov 8, 2015

Discovered during deployment testing, currently our CSS looks for the FontAwesome webfont files for an app deployed at SERVER/subdirectory to be in the SERVER/assets directory, not the SERVER/subdirectory/assets directory where they actually live.

@orenyk
Copy link
Contributor Author

orenyk commented Nov 8, 2015

Known issue, although we're kinda already doing both of the fixes (running RAILS_ENV=production rake assets:precompile and setting ENV['RAILS_RELATIVE_URL_ROOT']=/bmec through .env). I guess the issue could be that dotenv is being initialized after font-awesome-rails is, but that doesn't quite make sense to me since as far as I knew that was one of the first gems to load (and it comes first alphabetically in any case 😛). The only other fix we could try is tweaking our Capistrano script to copy the relative root into production.rb directly to see if the FontAwesome gem picks it up that way, but I'd really rather not. I'll dig into this a bit more.

@orenyk
Copy link
Contributor Author

orenyk commented Nov 8, 2015

Ok, some more digging. font-awesome-rails uses the font_path method to compute the directory, which is based on the asset_path method in ActionView. That should use the Rails.config.relative_url_root parameter which is defined by dotenv. That said, I'm guessing that dotenv doesn't load during the Bundler call unless specified otherwise, so I'm trying to add the necessary parameter to our Gemfile. Opening PR now.

orenyk added a commit that referenced this issue Nov 8, 2015
Resolves #1342
- update font-awesome-rails gem version
- set dotenv to load before rest of gems
orenyk added a commit that referenced this issue Nov 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant