similar to: Modifying ActiveResource classes

Displaying 20 results from an estimated 3000 matches similar to: "Modifying ActiveResource classes"

2011 Jan 03
4
How to get soap4r to not bother verifying SSL certificate (verify_mode none)?
Using Ruby 1.8.7, Rails 2.3.8. I don''t want it to verify the cert... This is my backtrace: OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed): httpclient (2.1.5.2) lib/httpclient/session.rb:247:in `connect'' httpclient (2.1.5.2) lib/httpclient/session.rb:247:in `ssl_connect'' httpclient
2013 Aug 29
4
Weird behaviour using ssl connection (OpenSSL::SSL::SSLError)
Hi guys when I execute the piece of code bellow on RoR console it works fine: url = URI.parse("https://us1.api.mailchimp.com/2.0/helper/ping") request = Net::HTTP::Post.new(url.path) http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request.body = "{\"apikey\": \"myapikey\"}" response = http.start
2010 Jun 09
12
Foreman -- Reporting
Hello All, I don''t seem to be able to get reports to display on the foreman interface. I copied extras/puppet/foreman/files/foreman-report.rb to / usr/lib/ruby/site_ruby/1.8/puppet/reportsforeman.rb, instead of /usr/ lib/ruby/1.8/puppet/reports/foreman.rb. Config: Centos5.4, Apache/ Passenger, Puppet 0.25.4. The reports are coming from the clients, because I can see them in
2009 Jul 16
1
ActiveResource timeout not functioning?
I''m trying to contact a REST API using ActiveResource on Rails 2.3.2. I''m attempting to use the timeout functionality so that if the resource I''m contacting is down I can fail quickly - I''m doing this with the following: class WorkspaceResource < ActiveResource::Base self.timeout = 5 self.site = "http://mysite.com/restAPI" end However, when I
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart` from a Heroku application to Facebook. I have the following JSON object: {"message"=>"My message", "image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490 @original_filename="neEZYMAnBI.jpg", @content_type="application/octet-stream",
2008 Dec 10
3
How to stop SOAP4R/OpenSSL requiring cert?
Hi I want to consume some web services that are only available over HTTPS. My method looks like this: def lookup_id myid=params[:id] driver = SOAP::WSDLDriverFactory.new("https://server.com/xxx.wsdl").create_rpc_driver @p=driver.verifyId(AUTH_TOKEN, PIN, myid) end Although this works fine on my local box (with a warning), when deployed to the staging server I get:
2006 Sep 01
2
Include ActiveResource
Hello, I want to give ActiveResource a spin. I have all the code checked out from SVN in vendor/rails (yes, including ActiveResource). I''m trying to make sure it gets loaded. I did this in environment.rb: config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/activeresource/lib ) Unfortunately I still can''t use it. I have an ActiveResource derived model, Address: class
2007 Sep 22
4
ActiveResource, find(1) works but no find(:all)
Hi, I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error [1]. Fuser is declared here [2]. Do you know what''s happening? Thanks. [1] ActiveResource::ServerError: Failed with 500 Internal Server Error from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in `handle_response'' from
2007 Mar 29
0
using certificates with ActiveResource
I''m trying to hack ActiveResource to use a self-signed certificate when connecting to my RESTful rails app (seems like a pretty glaring hole that it doesn''t offer this out of the box... though I guess it is alpha software). I started out going through the ActiveResource code looking for somewhere I could set the cert and key. Didn''t find it, so I took the approach
2006 Sep 01
2
Uninitialized constant w/ ActiveResource
Howdy, I had an application perfect for ActiveResource, which I do realize is not finished. Anyway, I froze my app to edge and then defined a class: class Address < ActiveResource::Base self.site = "http://ws.geonames.org/findNearestAddress?lat=:lat&lng=:long" End I tried to use it from the console but I get the trace below. It appears it can''t
2008 Sep 28
4
ActiveResource and InvalidAuthenticityToken exception
Hi, I have a Rails 2.1.1 web app, and a Rails 2.1.1 app acting as a client by using ActiveResource. From the client, I can find, create, and update resources owned by the web app. However, I can not delete any. Calling the .destroy method in ActiveResource generates a 422 from the web app. Not sure why this would be the case, since I thought protect_from_forgery only protects HTML and JS
2009 May 20
1
activeresource-2.3.2 HTTPHeaderSyntaxError
Hi, I''m upgrading my app from 2.2.2 to 2.3.2 and am having a problem with ActiveResource. class FooResource < ActiveResource::Base self.site = "whatever" self.element_name = "foo" end FooResource.create(:bar => ''baz'') raises: Net::HTTPHeaderSyntaxError: wrong Content-Length format from
2009 Jun 24
3
ActiveResource:: HttpMock
I''m trying to set up testing on my ActiveResource project. The HttpMock appears to be what I want, but whenever I use the code in the "documentation", I get the error NameError: uninitialized constant ActiveResource::HttpMock Is there something I need to do to enable HttpMock testing? Thanks, Tom
2007 Jun 21
2
does activeresource only work with edge?
hey all, I''ve just installed the activeresource gem and it wasn''t working, so I did gem update rails and it worked. But now I have rails-1.2.3.6906 and I think this is edge right? Is there a way to work on regular rails 1.2.3 with activeresource? thanx in advance Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2007 Jan 31
2
SystemStackError: stack level too deep
I''m testing the http module in console. BUt I got the following error. Anyone knows why? >> Net::HTTP.get_print ''www.google.com'', ''index.html'' SystemStackError: stack level too deep from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in `newobj'' from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
2007 Jul 04
1
Edge Rails required for ActiveResource
Just wanted to make sure I''m not missing anything here... I''m trying to use ActiveResource and I was trying to avoid using Edge Rails. However, since ActiveResource depends on the edge version of activesupport, I appear to be stuck going edge... have flailed around for a while trying to get ActiveResource to work with 1.2.3 but it just ain''t happening. Am I right? Gotta
2010 May 15
3
ActiveResource Mock Objects
Some of my tests use ActiveResource HttpMock requests and some of them do not. Does anyone know if there is a way to disable the HttpMocks after they have already been loaded? The method ActiveResource::HttpMock.reset! only removes all the objects, but ActiveResource still thinks it should look for mock requests rather than actually making requests. I hope this makes sense! Thanks, Tom --
2007 Jul 27
2
Specifying format in ActiveResource
Hi all, I have a need for making ActiveResource have the ability to specify the format much like you can specify the site. So, right now (unless I am not understanding the code, which could be, since I am a Rails and Ruby newbie), all calls end up at http://something/call.xml. I want to be able to call http://something/call.rss or .vcf, etc. This is stemming from the Highrise api in 37
2011 Mar 27
2
LinkedIn still not working?
To clarify the issue I posted earlier: I am on OS X 10.6.7. Trying to use Mechanize to log in to LinkedIn. As others have posted about in the past, when I submit the form it kicks me back to the LinkedIn landing page, and does not log me in. I read the earlier discussion of the issue that mentioned how cookie values were being improperly dequoted when stored. But I thought that issue was fixed.
2008 Jan 13
6
Graceful way to handle execution expired and bad URI errors?
Hello, I have a program that takes blog urls that our customers enter into their profiles. In some cases they enter bad feeds (IE html pages instead of atom or rss), and it throws these two errors: execution expired and bad URI errors in the view. I need to find a graceful way to handle both. Preferably, if I could find a way to throw an error message for the execution expired