Ruby: Difference between revisions
Appearance
imported>Samueldr m forces TOC |
Link to nixpkgs-ruby |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 40: | Line 40: | ||
== See also == | == See also == | ||
* [[Packaging/Ruby]] | |||
* [https://github.com/manveru/bundix manveru/bundix] Generates a Nix expression for your Bundler-managed application | * [https://github.com/manveru/bundix manveru/bundix] Generates a Nix expression for your Bundler-managed application | ||
* [https://nixos.org/nixpkgs/manual/#sec-language-ruby Chapter 9.14 Ruby of the | * [https://nixos.org/nixpkgs/manual/#sec-language-ruby Chapter 9.14 Ruby of the nixpkgs manual] | ||
* [https://github.com/bobvanderlinden/nixpkgs-ruby nixpkgs ruby] A Nix repository with all Ruby versions being kept up-to-date automatically | |||
[[Category:Languages]] | |||
[[Category:Ruby]] |
Latest revision as of 18:12, 13 May 2025
☶︎
This article or section needs to be expanded. Further information may be found in the related discussion page. Please consult the pedia article metapage for guidelines on contributing.
Troubleshooting
Trouble with native dependencies
Few gems will force include paths for their native dependencies in the extconf.rb describing their native dependencies.
This issue will exhibit symptoms like being unable to find dependencies that are made available through nix when building; either through bundix or simple bundler calls.
A simple fix is to fork the gem into an alternative location, apply the fix that follows, and then reference the new git repository with fix for the gem.
The fix will probably look like this (for ruby-filemagic):
diff --git a/ext/filemagic/extconf.rb b/ext/filemagic/extconf.rb
index 316e0ab979d243d03a967fda962a43b59a1bbdec..062e91d1023a3363962531fc8a54e7f0feb3bc26 100644
--- a/ext/filemagic/extconf.rb
+++ b/ext/filemagic/extconf.rb
@@ -1,15 +1,11 @@
require 'mkmf'
+# gcc should be able to handle this properly.
HEADER_DIRS = [
- '/opt/local/include', # MacPorts
- '/usr/local/include', # compiled from source and Homebrew
- '/usr/include', # system
]
+# gcc should be able to handle this properly.
LIB_DIRS = [
- '/opt/local/lib', # MacPorts
- '/usr/local/lib', # compiled from source and Homebrew
- '/usr/lib', # system
]
$CFLAGS << ' -Wall' if ENV['WALL']
See also
- Packaging/Ruby
- manveru/bundix Generates a Nix expression for your Bundler-managed application
- Chapter 9.14 Ruby of the nixpkgs manual
- nixpkgs ruby A Nix repository with all Ruby versions being kept up-to-date automatically