gem install solr_sail solrsail install solrsail start
When you run
solrsail install there will be a fair amount of output, as Jar dependencies are downloaded and the Solr config directory is extracted to the default path of solr.
solrsail start is called, Solr will start up using the solr dir for configuration.
Now you can visit http://localhost:8983/solr and see the fruit of your labor.
Additional configuration options are detailed at https://github.com/mguymon/solr_sail
SolrSail relies heavily upon LockJar to manage the 57 Jar dependencies required to setup and run Solr. Packaged with the solr_sail.gem is a Jarfile.lock that contains all the Jar dependencies. As part of the
install, LockJar uses the Jarfile.lock to check that the Jar dependencies exist and download missing one. For the
start call, LockJar populates the Classpath based on Jarfile.lock.
Developing SolrSail was amazingly easy*. I used Maven for all the Jar dependencies, which integrates nicely with Eclipse. All I need to do to tie my Java with JRuby was create the following 1 line Jarfile for LockJar:
When LockJar locks the Jarfile, the Maven pom.xml is parsed for dependencies, a list of transitive Jar dependencies is created as the Jarfile.lock. In my Ruby, I have LockJar load all the Jar dependencies and I have full access to the my Java.
All in One step
This scenario works well, because it has two steps: install than start. Very similar to how Bundler works. This allows all the Jar dependencies to be downloaded separately before the start. It is possible to combine all of this into one step, the only downside is that LockJar would check that Jar dependencies exist every time (which may not be a bad thing).
*Developing the Ruby was easy once I created a Rakefile that works with a Maven style layout2 years ago