There is no easy way of doing it.
I am sure that database was not cleanly shutdown so you won't be able to use only mdf file to recover the database (sp_attach_single_file_db)
Do below steps.
== I detached ran for pubs database files==
DBCC CHECKPRIMARYFILE('C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf', 3)
dbcc rebuild_log('dbname','New Log File NAme')
THIS IS UNDOCUMENTED COMMAND.
database will come into Single User mode
Run dbcc checkdb and if there are problems then you need to restore from backup
HTH