Yes, you can get a picture, although I would think that it depends on which versions you use.
im using
rvm current ruby-1.9.3-P194
> gem list oauth (0.4.6) oauth2 (0.8.0) omniauth (1.1.0, 1.0.3) omniauth-facebook (1.4.1, 1.4.0) omniauth-google (1.0.1) omniauth-google-oauth2 (0.1.13) omniauth-oauth (1.0.1) omniauth-oauth2 (1.1.0, 1.0.3) omniauth-twitter (0.0.12)
I came here for another reason, because the naming convention for accessing profile properties is different from the explanations in various textbooks, as I experienced an error when completing the sign. In fact, in your question, you may find that you will have the same problems.
The problem is that google has different property names from FB, Twitter, etc., so you need to keep this in mind.
To find the properties, I commented out the executable bit and simply discarded the answer. So.
elsif service_route == 'google_oauth2' render :text => omniauth.to_yaml return
Your google profile information will be displayed here, which we hope is as follows.
--- !ruby/hash:OmniAuth::AuthHash provider: google_oauth2 uid: '1234567' info: !ruby/hash:OmniAuth::AuthHash::InfoHash name: Your Name email: yourEmail first_name: firstname last_name: surname image: https://animage credentials: !ruby/hash:Hashie::Mash token: aToken expires_at: 123 expires: true extra: !ruby/hash:Hashie::Mash raw_info: !ruby/hash:Hashie::Mash id: '123456' email: YourEmail verified_email: true name: YourName given_name: Name family_name: surname link: https://plus.google.com/blah picture: https://lh6.googleusercontent.com/blah blah gender: male birthday: '' locale: en-GB
As you can see, the parameter names are different, get rid of user_info and have information instead.
You will also notice that you have an image: and an image: so until I tried, I would assume that this is your profile.
elsif service_route == 'google_oauth2' omniauth['info']['email'] ? email = omniauth['info']['email'] : email = '' omniauth['info']['name'] ? name = omniauth['info']['name'] : name = '' omniauth['uid'] ? uid = omniauth['uid'] : uid = '' omniauth['provider'] ? provider = omniauth['provider'] : provider = '' omniauth['info']['image'] ? image = omniauth['info']['image'] : image = ''