"curl: (3) <url> malformed" error

723 views
Skip to first unread message

JayOheN

unread,
May 2, 2012, 3:40:37 PM5/2/12
to factory_girl
Hi all,

I am using factory_girl (3.2.0) in Rspec tests and have been getting
an error (curl: (3) <url> malformed) when I call FactoryGirl.create
(and FactoryGirl.build) for one of my Models. I have traced the error
to what I believe to be something in the FactoryGirl callback methods
(rather than my Model) since creating a Model without FactoryGirl
works just fine. Also, this error does not seem to affect the tests
as they all finish and still pass.

I am running the tests on an EC2 instance (Ubuntu 10.04.3 LTS) which
throws the error, but on my local machine (OS X Lion) the error does
not occur.

I was wondering if anyone might have seen this before or have any
advice on tracking down the source of the bug (or really just point me
in any direction). This has mystified me for some time now.

Best,
Jonathan

Joe Ferris

unread,
May 2, 2012, 3:53:19 PM5/2/12
to factor...@googlegroups.com
Hey Jonathan,

There isn't anything in factory_girl that references curl, so it has to be something in one of your factories, your models, or something else your application depends on.

If it doesn't happen locally but it happens on another server, it sounds like an environment different. If something is actually making a curl call, it's probably because the URL doesn't generate correctly in other environments.

It's hard to say more without seeing the code, but I'd start looking through your models to see which one is calling curl. Looking at the full backtrace (try rspec -b) should help you find it.

-Joe
--
Individuals over processes. Interactions over tools. Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:

You received this message because you are subscribed to the "factory_girl" mailing list.
To post to this group, send email to factor...@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at

Jonathan Dinu

unread,
May 2, 2012, 4:00:17 PM5/2/12
to factor...@googlegroups.com
Thanks for such a quick response! Yeah, I figured FactoryGirl doesn't use curl, but am running out of places to look so I thought I would reach out.  Your suggestions are really helpful though and hopefully I will get to the bottom of it soon.

Best,
Jonathan
Reply all
Reply to author
Forward
0 new messages