0

I have installed CartoDB on my local machine and I can't upload data via import.

Data to upload

Latitude,Longitude,Name
48.1,0.25,"First point"
49.2,1.1,"Second point"
47.5,0.75,"Third point"

I am receiving the error:

true: Importing data from /tmp/imports/20151014-21811-1binquy/123.csv
true: File-based import load
true: Detected encoding ISO-8859-1
true: Using database connection with {:adapter=>"postgres", :encoding=>"unicode", :host=>"localhost", :port=>5432, :database=>"cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db", :username=>"postgres", :conn_validator_timeout=>900, :pool=>50, :user=>"development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090"}
false: ogr2ogr call: OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=ISO-8859-1 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090 dbname=cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db password=53e933beffd3aef71b99afe6586c9afca5804943development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090" -lco DIM=2 -lco PRECISION=NO /tmp/imports/20151014-21811-1binquy/123.csv -nln cdb_importer.importer_e2b0c8ba726711e59e5400505681560b -nlt PROMOTE_TO_MULTI 
true: ogr2ogr output: sh: -f: command not found
true: ogr2ogr exit code: 32512
2015年10月14日 11:37:03 UTC: Ogr2ogr FAILED!
2015年10月14日 11:37:03 UTC: ogr2ogr.exit_code = 32512
2015年10月14日 11:37:03 UTC: ogr2ogr.command = OSM_USE_CUSTOM_INDEXING=NO PG_USE_COPY=YES PGCLIENTENCODING=ISO-8859-1 -f PostgreSQL PG:"host=localhost port=5432 user=development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090 dbname=cartodb_dev_user_f4f00efc-27e9-4321-af96-8bbb73245090_db password=53e933beffd3aef71b99afe6586c9afca5804943development_cartodb_user_f4f00efc-27e9-4321-af96-8bbb73245090" -lco DIM=2 -lco PRECISION=NO /tmp/imports/20151014-21811-1binquy/123.csv -nln cdb_importer.importer_e2b0c8ba726711e59e5400505681560b -nlt PROMOTE_TO_MULTI 
2015年10月14日 11:37:03 UTC: ogr2ogr.command_output = sh: -f: command not found
true: Errored importing data from /tmp/imports/20151014-21811-1binquy/123.csv:
===LOG END===
true: ----------------------------------------------------
false: ["/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:335:in `check_for_import_errors'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:268:in `run_ogr2ogr'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:63:in `block (2 levels) in run'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:62:in `block in run'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/loader.rb:52:in `run'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:222:in `file_based_loader_run'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:177:in `import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:327:in `execute_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:256:in `block (3 levels) in single_resource_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:249:in `each'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:249:in `each_with_index'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:249:in `block (2 levels) in single_resource_import'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:248:in `block in single_resource_import'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:226:in `single_resource_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:95:in `run_import'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:88:in `block in run'", "/opt/openmap/carto/cartodb/lib/cartodb/stats/aggregator.rb:97:in `method_missing'", "/opt/openmap/carto/cartodb/services/importer/lib/importer/runner.rb:87:in `run'", "/opt/openmap/carto/cartodb/app/connectors/importer.rb:39:in `run'", "/opt/openmap/carto/cartodb/app/models/data_import.rb:618:in `new_importer'", "/opt/openmap/carto/cartodb/app/models/data_import.rb:354:in `dispatch'", "/opt/openmap/carto/cartodb/app/models/data_import.rb:163:in `run_import!'", "/opt/openmap/carto/cartodb/lib/resque/importer_jobs.rb:9:in `block in perform'", "/opt/openmap/carto/cartodb/lib/resque/base_job.rb:21:in `call'", "/opt/openmap/carto/cartodb/lib/resque/base_job.rb:21:in `run_action'", "/opt/openmap/carto/cartodb/lib/resque/importer_jobs.rb:9:in `perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/job.rb:240:in `block (3 levels) in perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-metrics-0.1.1/lib/resque/metrics.rb:353:in `around_perform_metrics'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/job.rb:239:in `block (2 levels) in perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/job.rb:247:in `call'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/job.rb:247:in `perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:250:in `perform'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:189:in `block in work'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:166:in `loop'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/worker.rb:166:in `work'", "/usr/local/lib/ruby/gems/1.9.1/gems/resque-1.25.2/lib/resque/tasks.rb:41:in `block (2 levels) in <top (required)>'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:205:in `call'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:200:in `each'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:200:in `execute'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'", "/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'", "/usr/local/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in `each'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'", "/usr/local/lib/ruby/1.9.1/rake/application.rb:63:in `run'", "/usr/local/bin/rake:32:in `<main>'"]
true: ----------------------------------------------------
2015年10月14日 11:37:03 UTC: Proceeding to register
2015年10月14日 11:37:03 UTC: After importer run
2015年10月14日 11:37:03 UTC: After dispatch
2015年10月14日 11:37:03 UTC: ERROR!
===LOG END=== 

Any ideas?

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Oct 14, 2015 at 14:46
0

2 Answers 2

2

If you can't find any solution you can do this by root

cd /usr/local/bin
mv ogr2ogr ogr2ogr2
vi ogr2ogr
#!/bin/bash
ogr2ogr2 "$@"

It is a very bad idea... but its work...

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
answered Oct 20, 2015 at 9:13
1

What worked for me was installing GDAL as detailed in this answer then changed "which ogr2ogr2" under app_config.yml to read "which ogr2ogr"

answered Nov 30, 2015 at 13:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.