Closed eddiezane closed 10 years ago
Nice Eddie. Thanks.
@scottmotte
On Mon, Feb 10, 2014 at 6:29 PM, Eddie Zaneski notifications@github.com wrote:
TLDR: Because the Gemfile.lock is included in the Gem, there are issues with the dependency on Faraday on a fresh install. To replicate, you could probably uninstall the
faraday_middleware
,faraday
, anddigitalocean
Gems andgem install digitalocean
. The issue lies with the fact that there are no restrictions included in the gemspec. The Gemfile.lock file has restrictions on:faraday (0.8.9) faraday_middleware (0.9.0) faraday (>= 0.7.4, < 0.9)
This causes faraday(0.9.0.rc7) to be installed which has the following error when attempting to use the Gem:
/Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/options.rb:54:in `fetch': undefined method `preserve_raw=' for #<Faraday::RequestOptions (empty)> (NoMethodError) from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:75:in `preserve_raw?' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:38:in `process_response' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:32:in `block in call' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/response.rb:57:in `on_complete' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday_middleware-0.9.0/lib/faraday_middleware/response_middleware.rb:30:in `call' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/request/url_encoded.rb:15:in `call' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/rack_builder.rb:139:in `build_response' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/connection.rb:377:in `run_request' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/faraday-0.9.0.rc7/lib/faraday/connection.rb:140:in `get' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/digitalocean-1.0.1/lib/digitalocean.rb:123:in `request_and_respond' from /Users/eddiezane/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/digitalocean-1.0.1/lib/digitalocean.rb:78:in `block (4 levels) in <module:Digitalocean>' from do.rb:6:in `<main>'
A fix would be to remove Gemfile.lock and specify dependency versions in the gemspec locking down faraday(0.8.9). I found a good stackoverflow on why Gemfile.lock's shouldn't be included in a Gem.
Reply to this email directly or view it on GitHub: https://github.com/scottmotte/digitalocean/issues/12
Totally wrong on the Gemfile.lock, it's actually not included. The issue is still present on the lack of versions in the gemspec however. I'll lock them down and PR.
I'm still having this very same issue, I had to install faraday-0.8.9 instead to get it working properly as eddiezane suggested. Why this issue has been closed? :-\
TLDR: Because the Gemfile.lock is included in the Gem, there are issues with the dependency on Faraday on a fresh install.
To replicate, you could probably uninstall the
faraday_middleware
,faraday
, anddigitalocean
Gems andgem install digitalocean
.The issue lies with the fact that there are no restrictions included in the gemspec. The Gemfile.lock file has restrictions on:
This causes faraday(0.9.0.rc7) to be installed which has the following error when attempting to use the Gem:
A fix would be to remove Gemfile.lock and specify dependency versions in the gemspec locking down faraday(0.8.9). I found a good stackoverflow on why Gemfile.lock's shouldn't be included in a Gem.