Steps for creating rails engine?

Hi all,

I want to create a small rails engine (like community engine) which
require me in future’s project also.

but I don’t know how?

Is it same as creating a rails application and merge that in another
application.?

What are the steps for creating rails engine?

please give me related link also if possible.

Thanks,

Vikas.