Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:43:54+00:00 2026-05-25T09:43:54+00:00

I have followed a screen cast form ryan bates railscast and every thing is

  • 0

I have followed a screen cast form ryan bates railscast and every thing is working fine except when i change my methods like as follows:

from

      def create
       omniauth = request.env["omniauth.auth"]
       current_user.authentications.create(:provider => omniauth['provider'], :uid =>         omniauth["uid"])
       flash[:notice] = "Authentication successful"
       rescue Exception => e
       # Just spit out the error message and a backtrace.
       render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" +    e.backtrace.join("\n") + "</pre></body></html>"
    end

to

  def create
    omniauth = request.env["omniauth.auth"]
    current_user.authentications.create(omniauth['provider'], omniauth["uid"])
    flash[:notice] = "Authentication successful"
  rescue Exception => e
    # Just spit out the error message and a backtrace.
    render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" + e.backtrace.join("\n") + "</pre></body></html>"
    end

i keep getting undefined method stringify_keys' for "twitter":String but every thing works fine the first way. any ideas here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:43:54+00:00Added an answer on May 25, 2026 at 9:43 am

    You have changed:

    current_user.authentications.create(:provider => omniauth['provider'], :uid =>         omniauth["uid"])
    

    to:

    current_user.authentications.create(omniauth['provider'], omniauth["uid"])
    

    You will get this error in any rails app as you are not specifying which fields to allocate the values to.
    An example (from one of my apps):

    ruby-1.9.2-p180 :002 > User.create("a", "b")
    NoMethodError: undefined method `stringify_keys' for "a":String
    

    I think you meant the following:

    user = User.find_by_provider_and_uid(auth["provider"], auth["uid"]) || User.create_with_omniauth(auth)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have followed numerous screen casts as well as trawled the backbone docs extensively
I've followed this Railscast on submitting a form via Ajax and updating a div
I have followed this guide: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html I have created a maven-plugin project hello-maven-plugin with
I have followed a tutorial on how to use the youtube gdata. Populating a
I have followed the following documentation and I am having problems. I access the
I have followed this guide to install Solr in TomCat running on Windows Server
I have followed the tutorial for getting a Thunderbird extention going and succeeded in
Hi have followed this tutorial using Core plot framework http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application My project compiles, but
I have followed his popular tutorial to connect Android to MySQL: http://www.helloandroid.com/tutorials/connecting-mysql-database It is
I have followed this tutorial which allowed me to create a Silverlight DataGrid that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.