You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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 afterfont-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.
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.
Discovered during deployment testing, currently our CSS looks for the FontAwesome webfont files for an app deployed at
SERVER/subdirectory
to be in theSERVER/assets
directory, not theSERVER/subdirectory/assets
directory where they actually live.The text was updated successfully, but these errors were encountered: