diff --git a/lib/solr_ead/indexer.rb b/lib/solr_ead/indexer.rb
index <HASH>..<HASH> 100644
--- a/lib/solr_ead/indexer.rb
+++ b/lib/solr_ead/indexer.rb
@@ -47,7 +47,7 @@ class Indexer
     elsif defined?(Rails.root)
       url = YAML.load(ERB.new(File.read(File.join(Rails.root,"config","solr.yml"))).result)[Rails.env]['url']
     elsif ENV['RAILS_ENV']
-      url = YAML.load(ERB.new(File.read(File.join(Rails.root,"config","solr.yml"))).result)[ENV['RAILS_ENV']]['url']
+      url = YAML.load(ERB.new(File.read("config/solr.yml")).result)[ENV['RAILS_ENV']]['url']
     else
       url = YAML.load(ERB.new(File.read("config/solr.yml")).result)['development']['url']
     end
Issue #2: elseif will fail if Rails.root is not defined