Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

Save facebook profile image in GCS

Gems / Libraries • Asked by Shashindran VIjayan
Hi, I'm trying to implement a simple social login feature where users can log in using facebook account. Currently I'm using devise omniauth for authentication and carrierwave and fog-google for image upload to Google Cloud Storage. Whenever I try to save the image to GCS, I'm getting 'string contains null byte' errors. How to resolve this?

def self.from_omniauth(auth)
  create do |user| =
    user.password = Devise.friendly_token[0, 20]
    user.first_name =
    user.last_name =
    user.username =
    user.remote_avatar_url =

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.