Comments (8)
Can confirm, having the same issues.
from unirest-ruby.
The method didn’t move (still defined on Unirest
module).
I just tested this and can’t reproduce the error. Also the tests are passing and the Unirest.user_agent
method is being tested.
Are you using the latest version (currently 1.1.2
) ?
from unirest-ruby.
Same problem here:
NoMethodError: undefined method `user_agent' for Unirest:Module
Unirest.methods.sort gives (user_agent nowhere to be seen):
=> [:!, :!=, :!, :<, :<=, :<=>, :==, :===, :=, :>, :>=, :id, :send, :ancestors, :autoload, :autoload?, :class, :class_eval, :class_exec, :class_variable_defined?, :class_variable_get, :class_variable_set, :class_variables, :clear_default_headers, :clone, :const_defined?, :const_get, :const_missing, :const_set, :constants, :default_header, :define_singleton_method, :delete, :display, :dup, :enum_for, :eql?, :equal?, :extend, :freeze, :frozen?, :get, :hash, :include?, :included_modules, :inspect, :instance_eval, :instance_exec, :instance_method, :instance_methods, :instance_of?, :instance_variable_defined?, :instance_variable_get, :instance_variable_set, :instance_variables, :is_a?, :kind_of?, :method, :method_defined?, :methods, :module_eval, :module_exec, :name, :nil?, :object_id, :patch, :post, :private_class_method, :private_constant, :private_instance_methods, :private_method_defined?, :private_methods, :protected_instance_methods, :protected_method_defined?, :protected_methods, :public_class_method, :public_constant, :public_instance_method, :public_instance_methods, :public_method, :public_method_defined?, :public_methods, :public_send, :put, :remove_class_variable, :remove_instance_variable, :respond_to?, :send, :singleton_class, :singleton_methods, :taint, :tainted?, :tap, :timeout, :to_enum, :to_json, :to_s, :trust, :untaint, :untrust, :untrusted?]
gem install gives:
Successfully installed unirest-1.1.2
Ruby version:
ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-darwin14.0.0]
from unirest-ruby.
+1
from unirest-ruby.
I think I found the problem. Looks like Unirest.user_agent
is only implemented in the master branch here on GitHub but is not published to Rubygems.
@ahmadnassri can you please bump the version and publish that?
Thank you.
from unirest-ruby.
+1
irb(main):003:0> require 'unirest'
irb(main):004:0> Unirest.user_agent
NoMethodError: undefined method `user_agent' for Unirest:Module
from (irb):4
from /usr/bin/irb:12:in `<main>'
from unirest-ruby.
+1
from unirest-ruby.
Can a new rubygems version be released please? It is not ideal to have github: 'Mashape/unirest-ruby'
in my Gemfile.
from unirest-ruby.
Related Issues (20)
- How do I handle timeout? HOT 2
- Unirest is depending on insecure rest-client gem version HOT 10
- Response body / parsing to a ruby Hash
- Unirest not working, conflicts with addressable HOT 1
- Get the new url
- Allow JSON response body to use symbols instead of strings
- Unirest headers not interpreted correctly HOT 4
- Unirest.default_header(..,..) returns undefined method `default_header' for Unirest:Module (NoMethodError) HOT 2
- Bump and republish HOT 2
- Upgrading to Rails 4.2.7 breaks funcitonality. HOT 1
- Add base_url method
- unirest depending on old json version. Ruby 2.4.0 includes json 2.0.2
- Disable automatically added square brackets at end of array name
- Unable to activate unirest HOT 2
- Upgrade gem version HOT 2
- Allow default headers to be overridden
- Update rest-client version to support >2.0.0 HOT 3
- Gem: POST method needs "body" rather then "parameters" parameter
- URI.escape is obsolete
- Json deprecation warning on ruby 2.7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unirest-ruby.