-
-
Notifications
You must be signed in to change notification settings - Fork 380
Open
Description
Basic checks
- I searched existing issues - this hasn't been reported
- I can reproduce this consistently
- This is a RubyLLM bug, not my application code
What's broken?
The RubyLLM::Attachment class uses Pathname but doesn't require it, causing an uninitialized constant RubyLLM::Attachment::Pathname error when creating attachments from file paths.
How to reproduce
ruby -e "require 'ruby_llm'; RubyLLM::Attachment.new('test.jpg')"See error: uninitialized constant RubyLLM::Attachment::Pathname
Expected behavior
The Attachment class should successfully create an attachment from a file path without errors.
What actually happened
Error occurs because lib/ruby_llm/attachment.rb uses Pathname on lines 21 and 164 but is missing require 'pathname' at the top of the file.
Error message:
uninitialized constant RubyLLM::Attachment::Pathname
Environment
- Ruby version: 3.4.8
- RubyLLM version: 1.12.0
- Provider: Anthropic
- OS: macOS (Darwin 24.6.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels