[openstreetmap/openstreetmap-website] rails commands fail with LoadError due to gd2-ffij on MacOS (Issue #5583)

Eric Theise notifications at github.com
Sat Feb 1 04:07:01 UTC 2025


### Problem

I wanted to try running the app outside of the provided Docker setup. I've followed the instructions in `INSTALL.md` and `gd` (2.3.3_6) has definitely been installed via `brew`. Any `rails` or `rake` command results in a `Couldn't load the gd2 library. (LoadError)`, e.g.

```
/Users/erictheise/.rvm/gems/ruby-3.3.4 at ohm-macos/gems/gd2-ffij-0.4.0/lib/gd2-ffij.rb:158:in `rescue in <module:GD2FFI>': Couldn't load the gd2 library. (LoadError)
        from /Users/erictheise/.rvm/gems/ruby-3.3.4 at ohm-macos/gems/gd2-ffij-0.4.0/lib/gd2-ffij.rb:144:in `<module:GD2FFI>'
        from /Users/erictheise/.rvm/gems/ruby-3.3.4 at ohm-macos/gems/gd2-ffij-0.4.0/lib/gd2-ffij.rb:10:in `<module:GD2>'
        from /Users/erictheise/.rvm/gems/ruby-3.3.4 at ohm-macos/gems/gd2-ffij-0.4.0/lib/gd2-ffij.rb:9:in `<main>'
        from <internal:/Users/erictheise/.rvm/rubies/ruby-3.3.4/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/Users/erictheise/.rvm/rubies/ruby-3.3.4/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /Users/erictheise/.rvm/rubies/ruby-3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
```

I saw that this was previously reported by @alongLFB in #5281, and that [PRs are going unaddressed in the gem's repo](https://github.com/dark-panda/gd2-ffij/pull/27). Wondering if anyone's come up with a workaround.

### Description

_No response_

### Screenshots

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5583
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/5583 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250131/7a38b5ae/attachment-0001.htm>


More information about the rails-dev mailing list