Skip to content

Conversation

@20goto10
Copy link

Gem metadata methods have changed. Local builds of rails-asset gems were failing with an error:

"NoMethodError: undefined method abbreviate' for #Gem::Indexer:0x000000128f04f0

The #abbreviate and #sanitize methods were moved to the Gem::Specification class in version 2.5.0 (https://blog.rubygems.org/2015/11/03/2.5.0-released.html). I've adjusted the worker code to handle the class correctly with the current version. However, I couldn't get this to work without updating the Ruby version (or make it work with newer versions than 2.2.3 because I don't have time to track down all the potential issues). I see this PR as a minor bugfix but the whole thing should be updated to a more recent Ruby version.

I do not know if this will also fix the path/String issue described in #421 because I was unable to reproduce that issue locally, but I think it is a distinct possibility.

@joshjordan
Copy link
Member

This change makes sense, but last I checked, there was another blocking issue for a ruby 2.2 upgrade. Let me test a bit locally.

@joshjordan
Copy link
Member

Were you experiencing issues with this on Ruby 2.0?

@20goto10
Copy link
Author

@joshjordan - Yes. I think the problem could also be fixed by tying this to a specific version of Rubygems but it makes sense to upgrade anyway (if only because Ruby 2.0.0 is pretty old).

@20goto10
Copy link
Author

P.S. I can reproduce the failing test locally so I'll patch that ASAP.

@20goto10
Copy link
Author

There was a problem with a deprecation warning ("os.tmpDir is deprecated") that comes up running the bower binary in 1.3.12, preventing the JSON parser from succeeding with the build output from the shell. I've updated the dependencies to corrected versions, and fixed the dependency tree to those specific releases using an NPM shrinkwrap file. Using a newer version of bower would also fix this problem but it breaks too many other things in rails-assets for me to be comfortable with those fixes. A lot of these dependencies are getting pretty cobwebby and ought to be updated (perhaps a rails-assets-2 is in order?). This fix should at least maintain compatibility.

@hut8
Copy link
Member

hut8 commented Jun 30, 2022

@20goto10 Thanks so much for this PR. It's pointed at the wrong branch (develop is 679 commits behind master) and I will delete that branch, and it also contains an NPM shrinkwrap file (which is great, but I'm about to add a package-lock.json). So thank you for your PR, but I'm going to close it and add the fix that you made about the abbreviate in the worker in a different branch. I'm guessing that you've moved to a better frontend asset management solution (like the kind that now comes with rails); I just wanted to thank you for your time and give you a well-earned update.

@hut8 hut8 closed this Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants