Aug 312011
 

A small note in the “in case I need this again” category.

I’m writ­ing a Sinatra app and want to add Twit­ter OAu­th for sign­ing in. A good way to do this appears to be with the omniauth gem but I ran into an issue. require 'oa-oauth' is the doc­u­mented way to require the right gem, but the error I was get­ting was ‘require’: no such file to load — oa-oau­th (Load­Er­ror), des­pite hav­ing installed the gem. I use RVM to con­trol the Ruby envir­on­ment, so also checked I’d installed the gem with the RVM ver­sion set to the ver­sion of Ruby I was using (1.9.2). Hunt­ing around I found a par­tial answer on the issues list. Par­tial, because the answers there did­n’t help, but the sug­ges­tion to try bundle show omniauth did. Bundle came back with Could not find gem ‘omni­au­th’ in the cur­rent bundle.

The answer turned out to be to edit the Gem­file to add gem omniauth to it, then run­ning bundle install. After that, bundle show omniauth found the gem, and require 'oa-oauth' in my Ruby app worked as well.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

/* ]]> */