Platform spec' in gem names #3057
-
Hi! Thank you for this great gem. It's a gem. And my, it's widely used. Structured document parsing and search; XML. Close to my heart. Much appreciation to all of you. Is it standard practice to put platform specifications in gem names? Can a gem do native install without being platform specific? What I'm seeing, developing on Mac and deploying on Linux, is some thrashing on source control of the file, Thank you again for this gem of a gem. Example:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @wbreeze, thanks for the kind words and for asking this question. Nokogiri ships precompiled native gems, and that's why the platform name is showing up in your lock file. This isn't commonly done -- most C extensions are compiled from source during installation. The first and most important piece of advice I have is: make sure you are on the latest version of bundler on all your platforms. The behavior around resolving platform-specific versions of gems has improved a lot over the last two years. Being on the latest version means that some of the bugs that have been fixed will no longer be present for you. The other thing you should do is to
and then your Gemfile.lock will have all the necessary dependencies for you to be able to The Installing Native Gems section in the docs has more information. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @wbreeze, thanks for the kind words and for asking this question.
Nokogiri ships precompiled native gems, and that's why the platform name is showing up in your lock file. This isn't commonly done -- most C extensions are compiled from source during installation.
The first and most important piece of advice I have is: make sure you are on the latest version of bundler on all your platforms. The behavior around resolving platform-specific versions of gems has improved a lot over the last two years. Being on the latest version means that some of the bugs that have been fixed will no longer be present for you.
The other thing you should do is to
bundle lock --add-platform <platform-name>
…