bokmann / font-awesome-rails

the font-awesome font bundled as an asset for the rails asset pipeline
http://fortawesome.github.com/Font-Awesome/
MIT License
1.86k stars 244 forks source link

Latest Gem release does not work with Rails 6.1.0 (though current master does) #210

Closed rst closed 3 years ago

rst commented 3 years ago

As of right now, the latest version of font-awesome-rails on rubygems.org is v4.7.0.5, from 2019 -- which is missing the more recent changes (present in Github, but not in the release) to make the gem as compatible with Rails 6.1, and update the .gemspec accordingly.

So, this release is marked as incompatible with Rails 6.1 -- but unfortunately there's a prior gem release, version 3.1.1.0, whose .gemspec specifies no upper bound. The upshot is that when a Rails app with gem font-awesome-rails is upgraded to Rails 6.1.0, bundler silently downgrades font-awesome-rails to version 3.1.1.0 -- which, despite what it says in the metadata, doesn't actually work with 6.1.0, resulting in various interesting complaints about undefined CSS classes and so forth.

There's an obvious workaround -- alter the app's Gemfile to pull in the gem from this repo, or a local clone, but it would be better all around for there to be an official release which is up to date.

Thanks!

ShockwaveNN commented 3 years ago

Duplicate of #206

jasonfb commented 3 years ago

since this is left open, I will mark here, the upgrade to Rails 6.1 breaks if you are stuck on a very old version of font-awesome-rails, specifically 3.1.1.0 —  https://github.com/bokmann/font-awesome-rails/blob/v3.1.1.0/font-awesome-rails.gemspec

You will note specifically 3.1.1.0 appears to have no upward bound on its Rails number, so many of us (myself!) were hanging out at that old gem version not even knowing it. Specifically, upgrading to Rails 6.1 while on the very old font-awesome-rails (3.1.1.0) breaks all the fonts (whereas they worked fine— on gem version 3.1.1.0— in Rails 6.0)

The frustration can come about if you attempt to bundle update font-awesome-raills, or set its version number to anything below 4.7.0.6 — because all the intermediate versions are correctly 'version-locked' to Rails's version.

the forthcoming 4.7.0.6 does indeed fix this issue in your Rails 6.1 app. Catch: the forthcoming 4.7.0.6 isn't released to Rubygems (yet! as of 2020-12-30) — I'm sure it will be pushed to rubygems soon.

In the meantime, Rails 6.1 upgraders can:

gem 'font-awesome-rails', branch: 'master', github: 'bokmann/font-awesome-rails'
rmm5t commented 3 years ago

v4.7.0.6 released. Sorry for the delay. Cheers. 🍻

jasonfb commented 3 years ago

@rmm5t -- you still might want to yank 3.1.1.0 cause everyone who installs rails new will get stuck on that version

rst commented 3 years ago

A new 6.1.0 app with gem 'font-awesome-rails now gets the (just released) 4.7.0.6. So, I think we're good until the release of 6.2.0 (or 7.0 if things go that way)...

stephenhuey commented 3 years ago

Since this is closed, I opened the following in a new issue.

Font Awesome icons are not being loaded when using the Bulma CSS framework although Bulma expects it to work. My app is running on Ruby 3 with Rails 6.1.3.1 and this is in my Gemfile:


gem "bulma-rails", "~> 0.9.1"
gem "font-awesome-rails", "4.7.0.6"

I initially tried font-awesome-rails with no version (the latest version). Here is my application.scss file:


@import "bulma";
@import "font-awesome";

Rubymine says Cannot resolve file 'font-awesome' and I'm really not sure of the cleanest way to get icons showing up in my browser.

Any ideas?

Yousaf1290 commented 2 years ago

Hi i'm still facing issue with rails "6.0.1" and gem version font-awesome-rails (4.7.0.7) i tried all version including (4.7.0.5, 4.7.0.6, 4.7.0.7) but didn't work out can someone please help me.