[MacRuby-devel] segmentation fault 11 with net:http post inside of a function?

Mark Villacampa markvjal at gmail.com
Wed Jul 3 05:17:20 PDT 2013


I think osx doesnt like the "localhost", try 127.0.0.1. Also, if you know a bit of Objc, try the same code there to see if it's a MacRuby only issue.

Sent from my iPhone

> On 03/07/2013, at 13:17, bryan rasmussen <rasmussen.bryan at gmail.com> wrote:
> 
> Hi,
> 
> I have the following:
> 
> require 'net/http'
> 
> def copy()
>  uri = URI('http://localhost:3000/api/copy/test')
>  Net::HTTP.post_form(uri, 'value' => "testing")
> 
> 
> end
> 
> copy()
> 
> 
> When I run that code with macruby myscript.rb
> I get segmentation fault 11,
> When I run this code
> 
> require 'net/http'
> 
> uri = URI('http://localhost:3000/api/copy/test')
> Net::HTTP.post_form(uri, 'value' => "testing")
> 
> I don't.
> 
> The post goes through fine in both instances. I suppose there has to
> be some really simple thing I am missing here?
> 
> Thanks,
> Bryan Rasmussen
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macruby-devel


More information about the MacRuby-devel mailing list