$ rails new my-app -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/master/template.rb
// ...
$ cd my-app
$ rails new my-app && cd my-app
add to Gemfile
:
gem 'blacklight', '>=6.3'
gem 'geoblacklight', '>=1.4'
then run
$ bundle install
// ...
$ rails generate blacklight:install --devise
// ...
$ rails generate geoblacklight:install -f
// ...
$ rake db:migrate
(in the same terminal window)
$ solr_wrapper
(in another terminal window)
$ git clone https://github.com/geoblacklight/geoblacklight-schema
// ...
$ cd geoblacklight-schema
a helpful tool resides at tools/solr/upload.rb
to upload geodata
into the solr instance. to run it, you'll need to pass the url of
the solr instance and the path to the sample data. so, from the
root of geoblacklight-schema
, you would run:
$ tools/solr/upload.rb http://127.0.0.1:8983/solr/blacklight-core examples/selected.json
you may run into an error:
/Users/adam/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rsolr-2.0.2/lib/rsolr/client.rb:24:in `initialize': uninitialized constant URI (NameError)
from /Users/adam/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rsolr-2.0.2/lib/rsolr.rb:22:in `new'
from /Users/adam/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rsolr-2.0.2/lib/rsolr.rb:22:in `connect'
from tools/solr/upload.rb:15:in `<main>'
to fix this, edit tools/solr/upload.rb
by adding
require 'uri'
to the top of the file. run the command again and you should be okay.
afterwards, you can remove the geoblacklight-schema
directory:
$ cd ..
$ rm -rf geoblacklight-schema
from the original terminal window, run:
$ rails server
and open http://localhost:3000
in a browser.