Michael Yagudaev
Michael Yagudaev

Reputation: 6129

Carrierwave cannot save file

Carrierwave keeps returning the error below when i tried to save a remote url.

photo = space.photos.build        
photo.remote_image_url = photo_url
photo.save!          
# NoMethodError: undefined method `gsub!' for nil:NilClass

Any ideas?

Upvotes: 0

Views: 295

Answers (1)

Michael Yagudaev
Michael Yagudaev

Reputation: 6129

It seems like it was just an old version of the fog gem, version 0.9.0. To solve the problem just add this to your gemfile:

gem 'fog', '>= 1.11.1'

Upvotes: 0

Related Questions