Ask A Question


You’re not receiving notifications from this thread.

Save facebook profile image in GCS

Shashindran VIjayan asked in Gems / Libraries
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 =

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 79,047+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2023 GoRails, LLC. All rights reserved.