<div dir="ltr">Finally I found the solution. The function set_rgeo_factory_for_column must be added to each model with a link to PostGIS where you specify which factory you are using. <div><br></div><div>example : set_rgeo_factory_for_column(RGeo::Geographic.simple_mercator_factory.projection_factory)<div>
<br>Thank you for your help and your time. <br></div></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><b>Brice.</b></div></div>
<br><br><div class="gmail_quote">2014-03-04 21:42 GMT+01:00 benebrice <span dir="ltr"><<a href="mailto:brice.bene@gmail.com" target="_blank">brice.bene@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><div dir="ltr">I tried to create the database manually with the template and only after does the migrations. I check the value before being recorded and it is ok (I can obviously unproject the projection). But when it is stored, it cannot be unproject. The problem can come from 2 different points. The activerecord-postgis-adapter/rgeo-activerecord or PostGIS. I think Rails 4 is a possible reason of that.</div>

</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><b>Brice.</b></div></div>
<br><br><div class="gmail_quote">2014-03-04 18:38 GMT+01:00 Dan Lyke [via PostGIS] <span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=5005829&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span>:<br>

<blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div class=""><div>

        On Tue, Mar 4, 2014 at 9:33 AM, benebrice <<a href="http://user/SendEmail.jtp?type=node&node=5005826&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
<br>> Thank you for your answer but unfortunately I had already tried this. I did
<br>> it again but still nothing. I used a similar configuration with a Rails 3
<br>> Application and Ruby 1.9.2 with PostiGIS 2. It was working.
<br><br></div><div>Is there perhaps a way to dump the SQL that your Rails ORM is
<br>generating? Seems to me like you've got a leaky abstraction layer
<br>somewhere, the problem is likely in Rails, and without knowing how
<br>Rails is going wrong we're just playing pin the tail on the donkey.
<br><br>Dan
<br></div></div><div>_______________________________________________
<br>postgis-users mailing list
<br><div class=""><a href="http://user/SendEmail.jtp?type=node&node=5005826&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </div></div><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class=""><div>
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div></div><a href="http://postgis.17.x6.nabble.com/Recording-problems-with-PostGIS-tp5005821p5005826.html" rel="nofollow" link="external" target="_blank">http://postgis.17.x6.nabble.com/Recording-problems-with-PostGIS-tp5005821p5005826.html</a>
        </div><div class=""><div><div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Recording problems with PostGIS, <a rel="nofollow" link="external">click here</a>.<br>

                <a href="http://postgis.17.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" link="external" target="_blank">NAML</a>
        </div></div></div></div></blockquote></div><br></div><div class="im HOEnZb">


        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://postgis.17.x6.nabble.com/Recording-problems-with-PostGIS-tp5005821p5005829.html" target="_blank">Re: Recording problems with PostGIS</a><br></div><div class="HOEnZb"><div class="h5">

Sent from the <a href="http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html" target="_blank">PostGIS - User mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>

postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>