As psychobunny suggests with the referenced links, you cant elaborate your own SSO plugin to gain acces from nodeBB to the user stored on your own database, making your Rails system to act as the SSO provider.
The other link is the write API nodebb provides. You would have to install this plugin in order to have it working.