Help, Exchanging JS Token for Rest Token using Ruby Oauth

Has anyone tried exchanging the JSAPI token for Oauth token using
Oauth Gem?

I’m getting invalid signature error. Am I missing something?
The code snippets are available at following discussion link:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs