Siva
Joined
2,150 Experience
21 Lessons Completed
0 Questions Solved
Activity
In development mode the custom fonts (Raleway) are present but it is not reflected in the staging environment. I deployed my app to Heroku.
Added the following command in the application.rb
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
Added the font-family in the application.bootstrap.scss
@font-face {
font-family: 'raleway-regular';
font-style: normal;
font-weight: 400;
src: font-url('raleway-regular.ttf') format('truetype');
}
@font-face {
font-family: 'raleway-semibold';
src: font-url('raleway-semibold.ttf') format('truetype');
}
@font-face {
font-family: 'raleway-medium';
src: font-url('raleway-Medium.ttf') format('truetype');
}
The font files are available in the my_app/app/assets/fonts
directory.
I created my rails using the command rails new my_app --javascript esbuild --css bootstrap --database postgresql
Rails version 7