{"id":1022,"date":"2011-08-31T19:16:32","date_gmt":"2011-09-01T02:16:32","guid":{"rendered":"http:\/\/www.laurenwood.org\/anyway\/?p=1022"},"modified":"2011-08-31T19:16:32","modified_gmt":"2011-09-01T02:16:32","slug":"requiring-omniauth","status":"publish","type":"post","link":"https:\/\/www.laurenwood.org\/anyway\/2011\/08\/requiring-omniauth\/","title":{"rendered":"Requiring OmniAuth"},"content":{"rendered":"<p>A small note in the \u201cin case I need this again\u201d category.<\/p>\n<p>I\u2019m writ\u00ading a <a href=\"http:\/\/www.sinatrarb.com\/\">Sinatra<\/a> app and want to add Twit\u00adter OAu\u00adth for sign\u00ading in. A good way to do this appears to be with the <a href=\"https:\/\/github.com\/intridea\/omniauth\"><code>omniauth<\/code><\/a> gem but I ran into an issue. <code>require 'oa-oauth'<\/code> is the doc\u00adu\u00admented way to require the right gem, but the error I was get\u00adting was <em>\u2018require\u2019: no such file to load \u2014 oa-oau\u00adth (Load\u00adEr\u00adror)<\/em>, des\u00adpite hav\u00ading installed the gem. I use <a href=\"http:\/\/beginrescueend.com\/\"><span class=\"caps\">RVM<\/span><\/a> to con\u00adtrol the Ruby envir\u00adon\u00adment, so also checked I\u2019d installed the gem with the <span class=\"caps\">RVM<\/span> ver\u00adsion set to the ver\u00adsion of Ruby I was using (1.9.2). Hunt\u00ading around I found a par\u00adtial answer on the <a href=\"https:\/\/github.com\/intridea\/omniauth\/issues\/193\">issues<\/a> list. Par\u00adtial, because the answers there did\u00adn\u2019t help, but the sug\u00adges\u00adtion to try <code>bundle show omniauth<\/code> did. Bundle came back with <em>Could not find gem \u2018omni\u00adau\u00adth\u2019 in the cur\u00adrent bundle<\/em>.<\/p>\n<p>The answer turned out to be to edit the Gem\u00adfile to add <code>gem omniauth<\/code> to it, then run\u00adning <code>bundle install<\/code>. After that, <code>bundle show omniauth<\/code> found the gem, and <code>require 'oa-oauth'<\/code> in my Ruby app worked as&nbsp;well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A small note in the \u201cin case I need this again\u201d cat\u00adegory. I\u2019m writ\u00ading a Sinatra app and want to add Twit\u00adter OAu\u00adth for sign\u00ading in. A good way to do this appears to be with the omni\u00adau\u00adth gem but I ran into an issue. require \u2018oa-oau\u00adth\u2019 is the doc\u00adu\u00admented way to require the right \u2026 <a href=\"https:\/\/www.laurenwood.org\/anyway\/2011\/08\/requiring-omniauth\/\" class=\"more-link\">Con\u00adtin\u00adue read\u00ading<span class=\"screen-reader-text\"> \u201cRequir\u00ading OmniAuth\u201d<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[13,6],"tags":[],"class_list":["post-1022","post","type-post","status-publish","format-standard","hentry","category-identity","category-technology"],"_links":{"self":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts\/1022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/comments?post=1022"}],"version-history":[{"count":6,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts\/1022\/revisions"}],"predecessor-version":[{"id":1026,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/posts\/1022\/revisions\/1026"}],"wp:attachment":[{"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/media?parent=1022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/categories?post=1022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laurenwood.org\/anyway\/wp-json\/wp\/v2\/tags?post=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}