Installing ruboto - ruboto

I use this site
http://rubysource.com/ruboto-rubys-and-androids-first-born/#comment-41291
but while i create
ruboto gen app --package org.ruboto.example.quick_start --target android-7
It gives error
/usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find ruboto (>= 0) amongst [RedCloth-4.2.9, abstract-1.0.0, actionmailer-3.2.5, actionmailer-3.2.3, actionmailer-3.2.0, actionmailer-3.1.1, actionmailer-3.0.3, actionmailer-3.0.0.beta4, actionmailer-2.3.5, actionmailer-with-request-0.3.0, actionpack-3.2.5, actionpack-3.2.3, actionpack-3.2.0, actionpack-3.1.1, actionpack-3.0.3, actionpack-3.0.0.beta4, actionpack-3.0.0.beta3, actionpack-2.3.5, active_scaffold-3.2.12, active_scaffold_vho-3.1.4, active_utils-1.0.3, activemerchant-1.22.0, activemodel-3.2.5, activemodel-3.2.3, activemodel-3.2.0, activemodel-3.1.1, activemodel-3.0.3, activemodel-3.0.0.beta4, activemodel-3.0.0.beta3, activerecord-3.2.5, activerecord-3.2.3, activerecord-3.2.0, activerecord-3.1.1, activerecord-3.0.3, activerecord-3.0.0.beta4, activerecord-2.3.5, activeresource-3.2.5, activeresource-3.2.3, activeresource-3.2.0, activeresource-3.1.1, activeresource-3.0.3, activeresource-3.0.0.beta4, activeresource-2.3.5, activesupport-3.2.5, activesupport-3.2.3, activesupport-3.2.0, activesupport-3.1.1, activesupport-3.0.3, activesupport-3.0.0.beta4, activesupport-3.0.0.beta3, activesupport-2.3.5, acts_as_indexed-0.7.8, anjlab-bootstrap-rails-0.1.4, ansi-1.3.0, arel-3.0.2, arel-2.2.1, arel-2.0.10, arel-2.0.8, arel-2.0.7, arel-2.0.6, arel-0.4.0, authlogic-3.1.0, awesome_nested_set-2.1.3, awesome_print-0.4.0, aws-s3-0.6.2, babosa-0.3.7, bcrypt-ruby-3.0.1, bcrypt-ruby-2.1.4, blankslate-2.1.2.4, bson-1.6.4, bson-1.5.2, bson_ext-1.6.4, bson_ext-1.5.2, builder-3.0.0, builder-2.1.2, bundler-1.1.3, cancan-1.6.7, capistrano-2.12.0, carrierwave-0.6.2, carrierwave-0.6.1, carrierwave-0.5.1, carrierwave-mongoid-0.2.1, cells-3.8.5, chunky_png-1.2.5, ckeditor-3.7.1, clearance-0.16.3, cloudfactory-0.4.0, cocaine-0.2.1, codemirror-rails-2.24, coderay-1.0.6, coderay-0.9.8, coffee-rails-3.2.2, coffee-rails-3.1.1, coffee-script-2.2.0, coffee-script-source-1.3.3, coffee-script-source-1.3.2, coffee-script-source-1.3.1, coffee-script-source-1.1.2, columnize-0.3.2, commonjs-0.2.6, compass-0.12.2, compass-rails-1.0.3, configuration-1.2.0, countries-0.8.2, country_select-1.0.0, currencies-0.4.0, custom_fields-2.0.0.rc12, daemons-1.1.4, devise-2.1.2, devise-2.0.4, devise-1.1.9, devise-encryptable-0.1.1, diesel-0.1.5, dragonfly-0.9.12, ejs-1.0.0, erubis-2.7.0, erubis-2.6.6, eventmachine-0.12.10, excon-0.13.4, execjs-1.4.0, execjs-1.3.2, execjs-1.2.9, faraday-0.8.1, fastercsv-1.5.4, flash_cookie_session-1.1.3, fog-1.3.1, formatador-0.2.3, formatador-0.2.1, formtastic-2.0.2, friendly_id-4.0.7, fssm-0.2.9, galetahub-simple_captcha-0.1.3, globalize3-0.2.0, gmaps4rails-1.5.2, haml-3.1.6, haml_coffee_assets-0.9.4, hashie-1.1.0, heroku-1.17.10, highline-1.6.13, highline-1.6.12, highline-1.6.2, hike-1.2.1, httparty-0.8.3, httparty-0.8.1, i18n-0.6.0, i18n-0.5.0, i18n-0.4.2, i18n-0.3.7, i18n-js-2.1.2, jbuilder-0.4.0, jnunemaker-validatable-1.8.4, joosy-1.0.0.RC2, journey-1.0.4, journey-1.0.3, jquery-rails-2.0.2, jquery-rails-1.0.19, jquery-rails-1.0.14, jquery-rails-0.2.7, jquery-rails-0.2.6, jruby-pageant-1.0.2, json-1.7.3, json-1.7.1, json-1.6.6, json-1.6.1, json-1.4.6, kaminari-0.13.0, kaminari-0.10.1, kgio-2.7.4, launchy-0.3.7, less-2.2.1, less-rails-2.2.3, libv8-3.3.10.4-x86_64-linux, locomotive-aloha-rails-0.20.1.4, locomotive-mongoid-tree-0.6.2, locomotive-tinymce-rails-3.4.7.2, locomotive_cms-2.0.0.rc9, locomotive_liquid-2.2.2, mail-2.4.4, mail-2.3.0, mail-2.2.19, mail-2.2.15, mail-2.2.12, mail-2.2.7, memcache-client-1.8.5, metaclass-0.0.1, method_source-0.6.6, millisami-csv-hash-0.2.0, mime-types-1.19, mime-types-1.18, mime-types-1.16, mimetype-fu-0.1.2, mini_exiftool-1.4.2, mini_magick-3.4, mocha-0.11.4, mocha-0.9.10, money-5.0.0, mongo-1.6.4, mongo-1.5.2, mongo_mapper-0.11.1, mongo_mapper-0.8.6, mongoid-3.0.1, mongoid-2.4.11, moped-1.1.2, multi_json-1.3.6, multi_json-1.3.5, multi_json-1.3.4, multi_json-1.3.2, multi_json-1.0.3, multi_xml-0.5.1, multi_xml-0.4.1, multipart-post-1.1.5, mysql-2.8.1, mysql2-0.3.11, negative_captcha-0.3, negative_captcha-0.2.beta, net-ldap-0.3.1, net-scp-1.0.4, net-sftp-2.0.5, net-ssh-2.5.2, net-ssh-2.4.0, net-ssh-2.3.0, net-ssh-gateway-1.1.0, nifty-generators-0.4.6, nifty-generators-0.4.4, nifty-generators-0.4.2, nokogiri-1.5.5, nokogiri-1.5.2, oauth-0.4.6, oauth2-0.5.2, origin-1.0.4, orm_adapter-0.4.0, orm_adapter-0.3.0, orm_adapter-0.0.7, paper_trail-2.6.3, paperclip-3.1.2, paperclip-2.5.2, pg-0.14.0, pg-0.13.2, pg-0.11.0, pjax_rails-0.1.10, plucky-0.4.4, plucky-0.3.8, polyglot-0.3.3, polyglot-0.3.2, polyglot-0.3.1, prem-0.0.0, prototype-rails-3.2.1, pry-0.9.6.2, pry-doc-0.3.0, rack-1.4.1, rack-1.3.4, rack-1.2.5, rack-1.2.1, rack-1.1.3, rack-1.0.1, rack-cache-1.2, rack-cache-1.1, rack-mount-0.8.3, rack-mount-0.6.14, rack-mount-0.6.13, rack-openid-1.3.1, rack-ssl-1.3.2, rack-test-0.6.1, rack-test-0.5.7, rack-test-0.5.6, rails-3.2.5, rails-3.2.3, rails-3.2.0, rails-3.1.1, rails-3.0.3, rails-3.0.0.beta4, rails-2.3.5, rails-backbone-0.6.1, rails3-generators-0.14.0, railties-3.2.5, railties-3.2.3, railties-3.2.0, railties-3.1.1, railties-3.0.3, railties-3.0.0.beta4, raindrops-0.10.0, rake-0.9.2.2, rake-0.9.2, rake-0.8.7, rdoc-3.12, rdoc-3.10, refinerycms-2.0.5, refinerycms-authentication-2.0.5, refinerycms-core-2.0.5, refinerycms-dashboard-2.0.5, refinerycms-i18n-2.0.0, refinerycms-images-2.0.5, refinerycms-pages-2.0.5, refinerycms-resources-2.0.5, render_component_vho-3.2.1, responders-0.6.5, responders-0.6.4, rest-client-1.6.7, rest-client-1.6.1, rmagick-2.13.1, rmagick-2.12.2, routing-filter-0.3.1, ruby-hmac-0.4.0, ruby-openid-2.1.8, ruby_parser-2.0.6, rubygems-bundler-0.9.2, rvm-1.11.3.3, sanitize-2.0.3, sass-3.1.20, sass-3.1.19, sass-3.1.18, sass-3.1.17, sass-3.1.10, sass-rails-3.2.5, sass-rails-3.1.4, seo_meta-1.3.0, sexp_processor-3.0.7, shoulda-2.11.3, slop-2.1.0, sorcery-0.7.12, sprockets-2.1.3, sprockets-2.1.2, sprockets-2.0.2, sqlite3-1.3.6, sqlite3-ruby-1.2.5, subexec-0.2.2, terminal-table-1.4.2, therubyracer-0.10.1, thin-1.2.11, thor-0.15.4, thor-0.15.3, thor-0.15.2, thor-0.14.6, thor-0.13.8, tilt-1.3.3, treetop-1.4.10, treetop-1.4.9, truncate_html-0.5.5, turn-0.8.3, twitter-bootstrap-rails-2.0.9, twitter_bootstrap_form_for-1.0.1, tzinfo-0.3.33, tzinfo-0.3.30, tzinfo-0.3.24, tzinfo-0.3.23, uglifier-1.2.6, uglifier-1.2.5, uglifier-1.2.4, uglifier-1.0.3, unicorn-4.3.1, unidecoder-1.1.1, warden-1.2.1, warden-1.1.1, warden-1.0.6, will_paginate-3.0.3, xml-simple-1.1.1, yard-0.7.2] (Gem::LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/bin/ruboto:18:in `<main>'
someone please help me

There is a problem using Ruby 1.9.x with Ruboto. This is planned to be fixed in the next release of Ruboto, in august. The issue is tracked here: https://github.com/ruboto/ruboto/pull/213
As a workaround, you can use Ruby 1.8.7 or JRuby 1.6.7.2 to run Ruboto.

Related

Catalog product page gives error 500 after upgrade from 1.7.3 to 1.7.6

I can't access the product catalog page or edit any products after upgrading from 1.7.3.1 to 1.7.6.1
It gives me two fatal php errors.
The first exception: Twig\Error\RuntimeError
in src/PrestaShopBundle/Resources/views/Admin/layout.html.twig (line 34)
layoutHeaderToolbarBtn is defined ? layoutHeaderToolbarBtn : [],
layoutDisplayType is defined ? layoutDisplayType : '',
showContentHeader is defined ? showContentHeader : true,
headerTabContent is defined ? headerTabContent : '',
enableSidebar is defined ? enableSidebar : false,
Line 34 help_link is defined ? help_link : ''
)
)) %}
{% import '#PrestaShop/Admin/macros.html.twig' as ps %}
The second exception: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
in vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php (line 348)
if ($lev <= \strlen($id) / 3 || false !== strpos($knownId, $id)) {
$alternatives[] = $knownId;
}
}
throw new ServiceNotFoundException($id, null, null, $alternatives);
}[enter image description here][1]
}
/**
* Returns true if the given service has actually been initialized.
Cross posted here https://www.prestashop.com/forums/topic/1003821-catalog-product-page-gives-error-500-after-upgrade-from-173-to-176/
Error screenshot
Turns out, that the related products module was not updated. It's a module bought on the Marketplace. I checked the compatibility and it said it was compatible with 1.7.6.1, so for that reason, combined with my backoffice telling me i had 0 available updates and that the module was up to date, i assumed it was all good.
But apparently, modules bought on the marketplace, don't have their updates show up in prestashop. 
I fixed the issue, by uninstalling the related products module and downloading the newest one 1.6.4 instead of 1.6.3 from the prestashop marketplace.

Postgresql: ERROR: unrecognized join type: 7

I have a lot of same structured PostgreSQL databases on same server
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413, 64-bit
And SQL going below, giving next error only on some of them:
SQLSTATE[XX000]: Internal error: 7 ERROR: unrecognized join type: 7
On the other databases with same structure it works fine. If i will decrease number of id_product values in query, it starts working
SELECT client_tt.id_client_tt as id,
client_tt.tt_name as caption,
SUM(delivery_data.money) AS value,
client_tt.latitude as lat, client_tt.longitude as lon
FROM delivery_data
JOIN client_tt on (client_tt.id_client_tt = delivery_data.id_client_tt)
WHERE (delivery_date BETWEEN '2017-01-01' AND '2017-03-31')
AND client_tt.latitude != 0 AND client_tt.longitude != 0
AND delivery_data.delivery_group_id IN (58)
AND delivery_data.id_product = ANY ( VALUES(7153), (9812), (5411), (9801), (5039), (7010), (4632), (5316), (1727), (9785), (5622), (8533), (5031), (756), (2769), (3239), (8680), (9775), (7958), (8630), (4059), (7185), (8261), (3652), (6950), (2148), (7828), (8695), (6228), (9803), (8112), (9536), (6466), (4447), (359), (3310), (7332), (4512), (5700), (7981), (4650), (9223), (8519), (4519), (9784), (8689), (8545), (541), (5134), (4081), (774), (6068), (7038), (6346), (7956), (10005), (9090), (537), (2300), (526), (4485), (8106), (3445), (559), (8256), (8825), (10085), (8874), (6680), (357), (6198), (2556), (5058), (7938), (5352), (8940), (2741), (4667), (6560), (4137), (5733), (763), (7088), (2486), (6512), (6642), (6674), (752), (4105), (2554), (6349), (7333), (6922), (3882), (2768), (3700), (9799), (9866), (9770), (533), (7384), (8468), (9320), (343), (5506), (4212), (8922), (10021), (6696), (9144), (3242), (5504), (6210), (5968), (5721), (2886), (8678), (7928), (7131), (4020), (9776), (6021), (6136), (6303), (9686), (7030), (8855), (6686), (9556), (10009), (1903), (8876), (6503), (2497), (8697), (10198), (2155), (5497), (5865), (8282), (4449), (7774), (6700), (7934), (8522), (9289), (10003), (8081), (5429), (547), (8320), (6305), (556), (2605), (8433), (9441), (5035), (9507), (6980), (2992), (5019), (7613), (9991), (2323), (4513), (3594), (8014), (737), (6298), (8449), (6285), (5790), (8266), (5041), (748), (7366), (9574), (5062), (5346), (2349), (5259), (8527), (5414), (5698), (6058), (7327), (4647), (8567), (4242), (8474), (3669), (3161), (7848), (6643), (8321), (8410), (530), (5415), (9097), (6031), (7219), (9768), (6793), (7646), (7049), (10079), (4761), (7324), (8679), (5032), (5141), (6556), (546), (7297), (358), (736), (6678), (8593), (5034), (8161), (9779), (4518), (5558), (758), (739), (4525), (9663), (8515), (8621), (3673), (535), (10094), (3443), (6933), (7717), (4248), (5139), (8123), (9920), (2355), (9936), (8307), (10228), (3619), (7273), (9162), (7279), (10011), (7921), (9462), (542), (9692), (5043), (5376), (8096), (8436), (5418), (10098), (2990), (5193), (6651), (1860), (6135), (8889), (4241), (3596), (6542), (2354), (762), (7360), (8326), (531), (5701), (5132), (4643), (6280), (9323), (4523), (6291), (8836), (3292), (5038), (4668), (3276), (560), (7852), (2299), (7120), (5633), (545), (9788), (4795), (2793), (9727), (6641), (7631), (553), (6670), (3004), (2984), (3293), (2865), (5094), (7867), (9322), (4249), (4672), (5263), (6197), (6689), (3456), (6137), (7599), (3576), (3577), (10096), (9763), (2867), (6276), (6316), (5404), (2303), (8710), (351), (5135), (5547), (2374), (8310), (8699), (10082), (2559), (7203), (7016), (5325), (3888), (742), (9398), (5322), (6134), (10004), (764), (9790), (5196), (7152), (9669), (7596), (8709), (9580), (7962), (1905), (2548), (4080), (5198), (9302), (9434), (5136), (552), (3767), (4243), (5242), (4654), (6645), (4670), (2898), (7975), (3175), (6608), (2490), (3210), (8183), (7608), (9496), (9564), (4777), (7605), (4804), (7601), (3211), (9164), (9913), (2888), (9767), (9167), (3291), (10076), (8272), (2369), (7597), (3138), (8529), (769), (9460), (9537), (3296), (9687), (8548), (766), (7312), (5018), (9563), (4540), (5421), (8973), (8636), (10099), (5373), (9824), (5095), (7017), (9540), (3621), (2985), (8440), (3889), (5374), (6690), (8514), (8405), (9233), (6761), (4373), (6661), (7253), (9458), (528), (4448), (3711), (8431), (9490), (544), (5929), (4077), (9725), (4508), (8811), (3298), (8863), (9108), (6788), (6362), (2697), (6610), (360), (6133), (8383), (780), (8406), (5082), (10084), (4078), (10018), (5138), (8108), (9766), (6652), (2547), (9491), (9409), (5045), (3651), (561), (8425), (8442), (9130), (9109), (3442), (4101), (6662), (8364), (2269), (4240), (4645), (2892), (4717), (5410), (5987), (8075), (8703), (3772), (746), (7598), (9780), (7606), (5417), (5509), (3898), (344), (2820), (3748), (6665), (7110), (776), (5507), (5706), (7158), (3765), (6943), (5324), (5513), (7097), (7923), (7924), (5750), (6340), (4486), (5286), (6703), (6640), (6694), (9566), (9912), (6616), (6656), (8671), (9791), (4522), (6912), (3090), (8661), (757), (3954), (527), (773), (2494), (345), (4168), (6151), (3595), (9764), (5726), (10016), (1939), (7966), (6288), (8711), (1900), (7894), (749), (3099), (6403), (8990), (772), (2558), (6281), (548), (9786), (8089), (8693), (9277), (10012), (9116), (7034), (740), (4247), (8706), (10233), (8090), (8682), (7615), (7667), (9291), (6352), (8829), (8698), (550), (6660), (9661), (5377), (5912), (10100), (9499), (10196), (549), (8427), (3771), (5372), (4743), (1519), (2324), (8117), (7963), (9032), (2301), (8141), (9140), (745), (4757), (7220), (6679), (2147), (5293), (5336), (9425), (8807), (4079), (3622), (6311), (8806), (9498), (2899), (4445), (7890), (5515), (8853), (765), (2557), (6047), (10002), (5514), (4100), (2890), (733), (4139), (1898), (555), (6059), (554), (5966), (6505), (3883), (6513), (8315), (7172), (5428), (9102), (2555), (8838), (2302), (4790), (8049), (8323), (6867), (2866), (10104), (6209), (9082), (9110), (6402), (9864), (7211), (8064), (3899), (6006), (7127), (779), (5013), (1997), (738), (7675), (4141), (7164), (7371), (5725), (8700), (4669), (6376), (9085), (3241), (8103), (6511), (2296), (5137), (5919), (7929), (2891), (3446), (10103))
GROUP BY client_tt.id_client_tt;
Fixed after upgrading from 9.6.1 to 9.6.2

TraCI Module - Problems running traci.start(sumoCmd)

sumoBinary = "/usr/bin/sumo-gui"
sumoCmd = [sumoBinary, "-c", "map.sumo.cfg"]
import traci
traci.start(sumoCmd)
When I use the traci.start(sumoCmd) I get the following error:
AtributeError: 'module' object has no attribute 'start'
What is logical because if I search for the traci module, and use the dir command to analyze there is no start function at all:
['FatalTraCIError', 'Message', 'Storage', 'SubscriptionResults', 'TraCIException', '_DEBUG', '_RESULTS', '_STEPS2TIME', '_TIME2STEPS', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_beginMessage', '_checkResult', '_connections', '_embedded', '_message', '_modules', '_readSubscription', '_recvExact', '_sendByteCmd', '_sendDoubleCmd', '_sendExact', '_sendIntCmd', '_sendReadOneStringCmd', '_sendStringCmd', '_subscribe', '_subscribeContext', 'areal', 'close', 'constants', 'edge', 'getParameterAccessors', 'getVersion', 'gui', 'inductionloop', 'init', 'isEmbedded', 'junction', 'lane', 'multientryexit', 'person', 'poi', 'polygon', 'print_function', 'route', 'simulation', 'simulationStep', 'socket', 'struct', 'switch', 'time', 'trafficlights', 'vehicle', 'vehicletype']
This function is well used and I thought it was included in the traci module.
As it can be seen: http://www.sumo.dlr.de/wiki/TraCI/Interfacing_TraCI_from_Python
Can anyone explain how can I locate it? Thanks
Also because of omnet++ I am using sumo-0.25.0 , was traci.start included in a later version?
Updated sumo traci module to a newer one (0.29) and it worked out.
Unfortunately, sumo-0.25 traci module doesn't have traci.start(sumoCmd) function

Laravel 5 QueryException When I try to call Edit Function

I am learning about Laravel 5 and studying from this source
https://laracasts.com/series/laravel-5-fundamentals/episodes/13
But when I try to make my own project which involves editing like the source taught me, I got "QueryException in Connection.php line 620:SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mscustomer.id' in 'where clause' (SQL: select * from mscustomer where mscustomer.id = 1 limit 1)"
Here are the code snippets
Routes.php
Route::get('edit/{member}', 'MemberController#edit');
MemberController.php
public function edit($custid)
{$member=mscustomer::findOrFail($custid);return view('member.edit' ,compact('member'));}
And here is the edit.blade.php
<h1>Edit</h1>
<hr/>
{!!Form::open(['url'=>'member'])!!}
<div class="form-group">
{!!Form::label('custname','Name :')!!}
{!!Form::text('custname',null,['class' => 'form-control'])!!}
<br>
{!!Form::label('password','Password :')!!}
{!!Form::password('password',null,['class' => 'form-control'])!!}
<br>
{!!Form::label('email','E-mail :')!!}
{!!Form::text('email',null,['class' => 'form-control'])!!}
{!!Form::submit('Register')!!}
{!!Form::close()!!}
#if ($errors->any())
#foreach ($errors->all() as $error)
<br>{{ $error }}</br>
#endforeach
#endif
As the error states, the id column doesnt' exist in Database.
If you did setup your database migrations properly you wanna run "php artisan migrate". IF you didn't. You need to set them up befor you can start using your Eloquent models.

Error creating geography element using "STGeomFromText( 'LINESTRING(..." - SQL 2008

I am getting the following error when trying to create geography elements in sql 2008:
NET Framework error occurred during execution of user-defined routine
or aggregate "geography": System.ArgumentException: 24200: The
specified input does not represent a valid geography instance.
System.ArgumentException:
Some example queries are:
select geography::STGeomFromText( 'LINESTRING(
53.4707 -2.24758,53.4708 -2.25079,53.4733 -2.2597,53.4743 -2.24812,53.4747 -2.24119,53.4756 -2.26244,53.4765 -2.24278,53.4805 -2.28457,53.4909 -2.37892,53.5272 -2.36252,53.7159 -2.56899,53.7165 -2.56208,53.7183 -2.62195,53.7212 -2.55478,53.7439 -2.48239,53.7443 -2.48351,53.7446 -2.48767,53.7455 -2.48894,53.7464 -2.48376,51.5126 -0.22443,51.5126 -0.22455,51.5129 -0.22522,51.5148 -0.22595,51.515 -0.22565,51.5152 -0.22007,51.5153 -0.21982,51.5153 -0.22207,51.516 -0.21593,51.5207 -0.16548,51.5274 -0.13044,51.5287 -0.1195,51.5294 -0.11581,51.5314 -0.114,51.5319 -0.10629,51.546 -0.10225,51.5468 -0.09851,51.5615 -0.09948,51.5618 -0.09859,51.5619 -0.09874,51.5621 -0.09774,51.5622 -0.09793,51.5629 -0.074843,51.5635 -0.07319,51.5638 -0.07423,51.5655 -0.07308,51.5065 -0.23453,51.5098 -0.2346,51.5125 -0.22443,51.5126 -0.22455,51.5141 -0.30077,51.3824 0.219232,51.3832 0.22189,51.3871 0.19381,51.3924 0.19631,51.4505 0.2384,51.4561 0.24682,51.4905 0.26753,51.6112 -0.13568,51.614 -0.1423,51.6149 -0.1279,51.6159 -0.0959,51.6166 -0.08625,51.6827 -0.04306,51.6827 -0.0485,50.8295 -0.135709,50.8336 -0.1389,51.0842 -0.20043,51.2584 -0.12584,51.4889 -0.49628,51.4928 -0.41087,51.493 -0.41909,51.5134 -0.40288,51.5158 -0.40192,51.5169 -0.41292,51.517 -0.41706,51.5171 -0.41794,51.5175 -0.41693,51.5189 -0.41131,51.506 -3.5765,51.5071 -3.57572,51.508 -3.57682,51.5089 -3.57687,51.5094 -3.57552,51.5268 -3.57319,51.5319 -3.57145,51.533 -3.567,51.5537 -2.54326,52.2083 -2.15995,52.2133 -2.15969,52.3653 -2.23896,52.3797 -2.25068,52.3856 -2.24433,52.3856 -2.24637,51.3017 0.14978,51.3168 -0.55901,51.317 -0.55852,51.3179 -0.5572,51.318 -0.55734,51.3714 -0.5076,51.3876 0.50573,51.3881 0.50679,51.3884 0.50491,51.3885 0.505716,51.3951 0.49271,51.3957 0.49308,51.3984 0.45032,51.3998 0.43212,51.423 0.2361,51.4259 0.23944,51.4269 0.24394,51.3017 0.14978,51.3168 -0.55901,51.317 -0.55852,51.3179 -0.5572,51.318 -0.55734,51.3714 -0.5076,51.3876 0.50573,51.3881 0.50679,51.3884 0.50491,51.3885 0.505716,51.3951 0.49271,51.3957 0.49308,51.3984 0.45032,51.3998 0.43212,51.423 0.2361,51.4259 0.23944,51.4269 0.24394,52.2027 0.13072,52.2027 0.13139,52.2041 0.12733,52.2048 0.12558,52.2052 0.124187,52.2083 0.13738,52.2139 0.1106,52.2139 0.1237,52.2146 0.12279,52.2163 0.13467,52.2332 0.07004,52.2374 0.06243,52.3776 -0.25321,52.5366 -0.3223,53.3912 -1.06914,53.5818 -1.21172,53.6173 -1.23025,53.809 -1.34127,54.1533 -1.43958,54.4485 -1.66852,54.7766 -1.57715,54.7777 -1.57547,54.7777 -1.57631,54.7906 -1.53038,54.7934 -1.52982
)' , 4326)
or
select geography::STGeomFromText( 'LINESTRING(
53.4707 -2.24758,53.4708 -2.25079,53.4733 -2.2597,53.4743 -2.24812,53.4747 -2.24119,53.4756 -2.26244,53.4765 -2.24278,53.4805 -2.28457,53.4909 -2.37892,53.5272 -2.36252,53.7159 -2.56899,53.7165 -2.56208,53.7183 -2.62195,53.7212 -2.55478,53.7439 -2.48239,53.7443 -2.48351,53.7446 -2.48767,53.7455 -2.48894,53.7464 -2.48376,51.5126 -0.22443,51.5126 -0.22455,51.5129 -0.22522,51.5148 -0.22595,51.515 -0.22565,51.5152 -0.22007,51.5153 -0.21982,51.5153 -0.22207,51.516 -0.21593,51.5207 -0.16548,51.5274 -0.13044,51.5287 -0.1195,51.5294 -0.11581,51.5314 -0.114,51.5319 -0.10629,51.546 -0.10225,51.5468 -0.09851,51.5615 -0.09948,51.5618 -0.09859,51.5619 -0.09874,51.5621 -0.09774,51.5622 -0.09793,51.5629 -0.074843,51.5635 -0.07319,51.5638 -0.07423,51.5655 -0.07308,51.5065 -0.23453,51.5098 -0.2346,51.5125 -0.22443,51.5126 -0.22455,51.5141 -0.30077,51.3824 0.219232,51.3832 0.22189,51.3871 0.19381,51.3924 0.19631,51.4505 0.2384,51.4561 0.24682,51.4905 0.26753,51.6112 -0.13568,51.614 -0.1423,51.6149 -0.1279,51.6159 -0.0959,51.6166 -0.08625,51.6827 -0.04306,51.6827 -0.0485,50.8295 -0.135709,50.8336 -0.1389,51.0842 -0.20043,51.2584 -0.12584,51.4889 -0.49628,51.4928 -0.41087,51.493 -0.41909,51.5134 -0.40288,51.5158 -0.40192,51.5169 -0.41292,51.517 -0.41706,51.5171 -0.41794,51.5175 -0.41693,51.5189 -0.41131,51.506 -3.5765,51.5071 -3.57572,51.508 -3.57682,51.5089 -3.57687,51.5094 -3.57552,51.5268 -3.57319,51.5319 -3.57145,51.533 -3.567,51.5537 -2.54326,52.2083 -2.15995,52.2133 -2.15969,52.3653 -2.23896,52.3797 -2.25068,52.3856 -2.24433,52.3856 -2.24637,51.3017 0.14978,51.3168 -0.55901,51.317 -0.55852,51.3179 -0.5572,51.318 -0.55734,51.3714 -0.5076,51.3876 0.50573,51.3881 0.50679,51.3884 0.50491,51.3885 0.505716,51.3951 0.49271,51.3957 0.49308,51.3984 0.45032,51.3998 0.43212,51.423 0.2361,51.4259 0.23944,51.4269 0.24394,51.3017 0.14978,51.3168 -0.55901,51.317 -0.55852,51.3179 -0.5572,51.318 -0.55734,51.3714 -0.5076,51.3876 0.50573,51.3881 0.50679,51.3884 0.50491,51.3885 0.505716,51.3951 0.49271,51.3957 0.49308,51.3984 0.45032,51.3998 0.43212,51.423 0.2361,51.4259 0.23944,51.4269 0.24394,52.2027 0.13072,52.2027 0.13139,52.2041 0.12733,52.2048 0.12558,52.2052 0.124187,52.2083 0.13738,52.2139 0.1106,52.2139 0.1237,52.2146 0.12279,52.2163 0.13467,52.2332 0.07004,52.2374 0.06243,52.3776 -0.25321,52.5366 -0.3223,53.3912 -1.06914,53.5818 -1.21172,53.6173 -1.23025,53.809 -1.34127,54.1533 -1.43958,54.4485 -1.66852,54.7766 -1.57715,54.7777 -1.57547,54.7777 -1.57631,54.7906 -1.53038,54.7934 -1.52982,53.3615 -2.2943,53.3616 -2.29438,53.3619 -2.29431,53.3626 -2.29606,53.363 -2.29748,53.3683 -2.31356,53.3687 -2.31296,53.3967 -2.26766,53.3984 -2.22994,53.481 -2.05105,53.4821 -2.05214,53.4821 -2.11473,53.4827 -2.10573,53.4828 -2.05008,53.4858 -2.05878,53.7633 -2.70157,53.7636 -2.70038,53.7672 -2.70313,53.7952 -2.98557,53.8002 -2.72228,53.8011 -2.71739,53.804 -3.02696,53.8139 -3.05028,53.815 -3.04473,53.8163 -3.05226,53.4707 -2.24758,53.4708 -2.25079,53.4733 -2.2597,53.4743 -2.24812,53.4747 -2.24119,53.4756 -2.26244,53.4765 -2.24278,53.4805 -2.28457,53.4909 -2.37892,53.5272 -2.36252,53.7364 -2.64886,53.7952 -2.98557,53.804 -3.02696,53.806 -2.70331,53.8139 -3.05028,53.815 -3.04473,53.8163 -3.05226,51.401 -0.5297,51.4052 -0.34152,51.4111 -0.300524,51.4126 -0.30176,51.4164 -0.42419,51.4191 -0.41833,51.7152 -0.3928,52.8399 -1.29605,52.8429 -1.29658,52.9216 -1.16451,52.9265 -1.16722,52.9488 -1.1511,52.9489 -1.15012,52.9493 -1.14992,52.9504 -1.14983,52.9509 -1.15128,52.9513 -1.1503,52.9514 -1.15141,52.9517 -1.15273,52.9521 -1.15199,51.502 -0.15932,51.5024 -0.1555,51.5033 -0.14984,51.5033 -0.15075,51.5042 -0.1511,51.5132 -0.16003,51.5134 -0.15871,51.5227 -0.17393,51.5685 -0.2291,51.5712 -0.23129,51.5719 -0.22982,51.573 -0.228,51.5731 -0.22961,51.5763 -0.23571,52.3953 -1.17295,52.6728 -2.07963,53.4061 -2.8963,53.407 -2.90128,53.4075 -2.90136,53.4078 -2.97954,53.4078 -2.9802,53.4078 -2.98228,53.408 -2.98106,53.41 -2.97854,53.4103 -2.90155,53.4103 -2.97767,53.4112 -2.97723,53.4133 -2.96398,53.4143 -2.96216,53.4237 -2.57435,53.4273 -2.91804,51.5033 -0.149834,51.5042 -0.1511,51.5044 -0.14749,51.5051 -0.15035,51.5051 -0.15089,51.5052 -0.15032,51.5056 -0.14872,51.5126 -0.15886,51.5132 -0.1607,51.5179 -0.16725,51.5226 -0.17378,51.5685 -0.22934,51.5686 -0.22953,51.5709 -0.23185,51.5719 -0.23053,52.4003 -1.17515,52.4768 -1.68081,52.6655 -2.06869,53.4062 -2.95647,53.4064 -2.89868,53.4064 -2.95565,53.407 -2.95622,53.4072 -2.95609,53.4075 -2.97961,53.4076 -2.98199,53.4076 -2.98408,53.4084 -2.97404,53.4087 -2.97886,53.4087 -2.98279,53.4092 -2.97452,53.4098 -2.91679,53.4213 -2.54907,51.4871 0.2647,51.4878 0.26815,51.4901 0.26826,51.4931 0.26921,51.4986 0.26975,51.4988 0.25643,51.499 0.25929,51.5001 0.25941,51.5002 0.25852,51.5019 0.26817,51.6053 0.26623,51.6087 0.26389,51.6108 0.26624,51.8917 0.8989,51.8918 0.89627,51.8918 0.89984,51.8919 0.89838,51.892 0.900363,51.8924 0.89627,51.8926 0.86479,51.8926 0.89413,51.8926 0.89605,51.8953 0.8574,51.8966 0.89092,51.5042 -0.08496,51.5051 -0.0844,51.5061 -0.08801,51.5063 -0.08826,51.5108 -0.08656,51.5114 -0.07264,51.5115 -0.07297,51.5119 -0.06908,51.5138 -0.07593,51.5152 -0.07174,51.5161 -0.08162,51.5266 -0.02797,51.5288 -0.01608,51.53 -0.01417,51.5311 -0.01715,51.5927 0.21329,51.5929 0.20981,51.8917 0.8989,51.8918 0.89627,51.8918 0.89984,51.8919 0.89838,51.892 0.900363,51.8924 0.89627,51.8926 0.86479,51.8926 0.89413,51.8926 0.89605,51.8953 0.8574,51.8966 0.89092
)' , 4326)
I have many similar queries than run just fine.
Can anyone tell me why these particular ones fail? I'm at a loss.
Thanks in advance.
I cannot see this from your data, but it seems that you are running into this problem: The LineString instance cannot overlap itself over an interval.
It might be useful for you to use the MakeValid() function to correct this.
It was indeed the line overlapping itself.
I managed to create a valid geography object using
http://sqlspatialtools.codeplex.com/
Great article here:
http://blogs.msdn.com/b/edkatibah/archive/2009/06/05/working-with-invalid-data-and-the-sql-server-2008-geography-data-type-part-2.aspx