gates
gates

Reputation: 4623

undefined local variable or method `remote_avatar_url' for main:Object

I have mounted AvatarUploader as show in carrierwave docs

class User < ApplicationRecord
  mount_uploader :avatar, AvatarUploader

When I try to create an user with url

FactoryGirl.create(:user, remote_avatar_url => "https://scontent.xx.fbcdn.net/v/t1.0-1/p100x100/14938353_1195336437213378_941804383137628957_n.jpg?oh=163a1fef88ec96558056094f60152976&oe=5A81C63F")`

NameError: undefined local variable or method `remote_avatar_url' for main:Object

Upvotes: 0

Views: 372

Answers (1)

Sergio Tulentsev
Sergio Tulentsev

Reputation: 230561

You forgot a colon:

FactoryGirl.create(:user, :remote_avatar_url => ...
                          ^ 

Upvotes: 2

Related Questions