Application-only Authentication Twitter API

Hello, I’m pretty new in Ruby/Rails world (4-5 days actually) I’m trying to implement Application-only Authentication from Twitter API, but I struggle to do it.
Is there any tutorial/example or some one kind enough to help?