Need help : Rails app unable to connect to Solr server Opti

Hi,

I am trying to integrate solr in ruby on rails application.For that i
am using the plugin acts_as_solr and gem solr-ruby. My solr server
starts successfully with command

$ rake solr:start

But when I try to add data from $ script/console , it says that it
cannot connect to solr server at the corresponding port.Same is the
result if i try the browser to link to http://localhost:8982/solr

The error is

RuntimeError: Couldn’t connect to the Solr server at
http://localhost:8982/solr.
404 “Not Found”

Can anyone please help me in this. :((