HTTParty force_encoding: encode_with_ruby_encoding - httparty

I've recently updated from 0.14.0 to version 0.15.2 and when I try to execute a #delete I'm receiving the following stacktrace:
NoMethodError: undefined method `force_encoding' for nil:NilClass
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty/request.rb:280:in `encode_with_ruby_encoding'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty/request.rb:316:in `_encode_body'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty/request.rb:322:in `encode_body'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty/request.rb:350:in `handle_response'
from /Users//.rben`enter code here`v/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty/request.rb:158:in `perform'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty.rb:563:in `perform_request'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty.rb:520:in `delete'
from /Users/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/httparty-0.15.1/lib/httparty.rb:617:in `delete'
I reverted back to version 0.14.0 and the issue doesn't persist. I'm a beginner to Ruby and I'm not really sure what this message is indicating.
Any assistance would be grateful.

If you look at https://github.com/jnunemaker/httparty/blob/e9f4624c1172120bbd39ddc636620a24fc9386b1/lib/httparty/request.rb#L278 you can see the force_encoding method referenced in the stack trace.
It appears that the response has no body, and so this method is being called on a nil object, which causes the error. This seems like a bug in HTTParty. If you can figure out reproduction steps to consistently produce this issue you could open up a github issue for the HTTParty folks to look into it further.

Related

Reflect.getOwnMetadata - Updating Aurelia

Reflect.getOwnMetadata is not a function in karma with latest Aurelia
I believe my issue to be the same as this, but I am unsure. I needed to update 'binding' from aurelia-binding#^1.0.0-beta.1.0.5 to aurelia-binding#^1.0.0-beta.1.3.0, due to a bug fix within that release, since updating I recieve the following error:
Uncaught (in promise) Error: TypeError: Reflect.getOwnMetadata is not
a function(…)
After a bit of research, mostly being linked back to the question above in one way or another, I had hoped their solution would solve mine however, gulp watch returns: import 'aurelia...' unexpected reserved work. Unsure what I am missing
I think the actual issue is with loading the following, seems to break here first
(function(System, SystemJS, require) {define(["npm:aurelia-templating-resources#1.0.0-beta.1.0.2/aurelia-templating-resources"], function(main) {
return main;
});
})(System, System);

Ember-data 1.0.0-beta.19: store.find() returns DS.INTERNALMODEL instances

I have update Ember-data to 1.0.0-beta.19 and now store.find('events') resolved promise returns DS.INTERNALMODEL instances, instead of DS.MODEL. With Ember-data 1.0.0-beta.18 it was working fine. Any ideas?
UPDATE
At the end i found out that somewhere in my app code i was using Ember-data internal code like store.find('events.content'), causing an exception. The debugger was not so helpful tracing it, but removing this fixed my issue.
This is a bug, if the promise resolves with DS.InternalModel, those are only for internal use of Ember-Data and shouldn't be exposed to user code. Please file a bug if this is still a problem
This is on purpose. It's noted in the chanelog:
#3094 Lazily materialize DS.Models for app code, use InternalModel inside ED otherwise
It should work largely with no issues. Are you having issues with it?
You can access the DS.Model using InternalModel.record

undefined local variable or method `start_test_server_in_background' for #<Object:0x007ffc49a5e130>

This has been asked before for .12.0 but I am now getting a similar error in .14.2 .
Up until a few weeks ago I was running calabash.framework 11.4 because it worked, was stable, and it was under lock and key on our development server. We went through a recent state of updating all of our gems and services and while our build server still functions calabash is no longer recognizing the "start_server_in_background" method. I am at a loss on how to remedy this. I tried a complete wipe and reinstall on my local mirror to no avail, and am considering rolling everything back to the previous working versions. However I would like to solve this to keep everything up to date.
I have tried the following solutions with no success.
undefined local variable or method `start_test_server_in_background' for main:Object
https://github.com/calabash/calabash-ios/issues/669
https://github.com/calabash/calabash-android/issues/371
This is my error after the scenario runs
undefined local variable or method `start_test_server_in_background' for #<Object:0x007f9a7c07ba48> (NameError)
/Users/mycomp/.rvm/gems/ruby-2.2.1#global/gems/rspec-expectations-3.2.1/lib/rspec/matchers.rb:926:in `method_missing'
/Users/mycomp/KonyiOSWorkspace/user/Kony/iOS-6.0.3.GA_v201503250510/VMAppWithKonylib/features/mobile/helpers/ios/support/app_life_cycle_hooks.rb:44:in `Before'
The recommend way of launching the application is to use:
options = { }
launcher.relaunch(options)
launcher.calabash_notify(self)
In your support/env.rb file you need to:
require 'calabash-cucumber/cucumber'
not calabash-cucumber.

Dojo console error objects empty

All of a sudden the errors that Dojo (1.8.3 from Google CDN) is spitting out empty errors, which makes debugging impossibly hard. For example, if I forget to require a dependent before using it, I get the usual
> dojo/parser::parse() error ReferenceError {}
... in the error console, but I remember getting more information in the ReferenceError (spindown arrow was present), giving me the arguments of the error as well as the message making it easy to figure out what I had done wrong.
I have isDebug : true in my dojoConfig, but it just doesn't want to tell me anything anymore.
What gives?
I've been having the same problem using Dojo 1.8.3 as well. When I close my developer tool's console and then re-open it the Error had the spindown and more details as expected. Seems stupid, but give it a try and see if that at "fixes" it for you. I planned on digging a little further into this later, so if I find any additional details I will make sure to update my answer with them.

how to use Selenium::WebDriver::Element#attribute('value')

I have been getting
Selenium::WebDriver::Element#value is deprecated, please use Selenium::WebDriver::Element#attribute('value') warning.
I am getting this warning message only for
page.find(:xpath, "//select").value.should == "general".
Can any one tell me how to use attribute('value') instead?
I suspect you use capybara?
Got the same message myself, but capybara currently still accesses the value directly as seen in https://github.com/jnicklas/capybara/blob/master/lib/capybara/selenium/node.rb#L16
I will send them a fix. Should be done in future versions hopefully