langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
48.51k stars 6.94k forks source link

Ruby SDK 0.1.0 is unusable completely (no lib files) #9521

Open sugi opened 3 hours ago

sugi commented 3 hours ago

Self Checks

Dify version

0.9.3

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

Just install ruby-sdk (dify_client = 0.1.0) and require the library.

You can confirm the gem archive has no lib files by following the command;

curl -s https://rubygems.org/downloads/dify_client-0.1.0.gem | tar xO data.tar.gz | tar zt

✔️ Expected Behavior

success loading with require 'dify_client'.

❌ Actual Behavior

sugi@tempest:~/ruby-sdk% bundle init
Writing new Gemfile to /home/sugi/ruby-sdk/Gemfile
sugi@tempest:~/ruby-sdk% bundle add dify_client
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching dify_client 0.1.0
Installing dify_client 0.1.0
sugi@tempest:~/ruby-sdk% bundle exec ruby -r dify_client -e 'p DifyClient'
/home/sugi/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in `require': cannot load such file -- dify_client (LoadError)
    from /home/sugi/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in `block (2 levels) in replace_require'
dosubot[bot] commented 3 hours ago

Hello @sugi!

I'm here to help you with any bugs, questions, or contributions you have for the Ruby SDK. Let me know how I can assist you!

The issue you're encountering with the Ruby SDK (dify_client) seems to be due to the absence of necessary library files in the gem package. This is confirmed by the command you provided, which shows that the gem archive lacks the expected lib files. Without these files, the require 'dify_client' statement cannot load the library, resulting in a LoadError.

To resolve this, you might need to check if there is an updated version of the gem that includes the necessary files or consider reaching out to the maintainers of the gem to report this packaging issue. Alternatively, if you have access to the source code, you could manually include the required files in your project until an official fix is released.

To continue talking to Dosu, mention @dosu.