Yes, you can share DB instances between applications - infact you don't even need to be using the Ronin addon, you can do it with the included PG - see this thread where I put forward a solution for doing this by using the same DB url in the second application as the first.
When you addons heroku typically write a bunch of heroku config variables for your app which they then use in files they write - eg database.yml - the actual database.yml file heroku write into your application is:
<%
require 'cgi'
require 'uri'
begin
uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
raise "Invalid DATABASE_URL"
end
raise "No RACK_ENV or RAILS_ENV found" unless ENV["RAILS_ENV"] || ENV["RACK_ENV"]
def attribute(name, value)
value ? "#{name}: #{value}" : ""
end
adapter = uri.scheme
adapter = "postgresql" if adapter == "postgres"
database = (uri.path || "").split("/")[1]
username = uri.user
password = uri.password
host = uri.host
port = uri.port
params = CGI.parse(uri.query || "")
%>
<%= ENV["RAILS_ENV"] || ENV["RACK_ENV"] %>:
<%= attribute "adapter", adapter %>
<%= attribute "database", database %>
<%= attribute "username", username %>
<%= attribute "password", password %>
<%= attribute "host", host %>
<%= attribute "port", port %>
<% params.each do |key, value| %>
<%= key %>: <%= value.first %>
<% end %>
I would imagine the same thing is going to be possible with websolr if you add it to a single instance and then see what config variables are set and set the same in the other applications. I would also imagine that this is unsupported by Heroku and they would actively discourage you from doing it however.