{"action":"created","issue":{"url":"https://api.github.com/repos/ffaker/ffaker/issues/307","repository_url":"https://api.github.com/repos/ffaker/ffaker","labels_url":"https://api.github.com/repos/ffaker/ffaker/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/ffaker/ffaker/issues/307/comments","events_url":"https://api.github.com/repos/ffaker/ffaker/issues/307/events","html_url":"https://github.com/ffaker/ffaker/issues/307","id":188917564,"number":307,"title":"FFaker NameErr breaks `rails console` command","user":{"login":"lukeipanda","id":1948795,"avatar_url":"https://avatars.githubusercontent.com/u/1948795?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeipanda","html_url":"https://github.com/lukeipanda","followers_url":"https://api.github.com/users/lukeipanda/followers","following_url":"https://api.github.com/users/lukeipanda/following{/other_user}","gists_url":"https://api.github.com/users/lukeipanda/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeipanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeipanda/subscriptions","organizations_url":"https://api.github.com/users/lukeipanda/orgs","repos_url":"https://api.github.com/users/lukeipanda/repos","events_url":"https://api.github.com/users/lukeipanda/events{/privacy}","received_events_url":"https://api.github.com/users/lukeipanda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-12T15:32:42Z","updated_at":"2016-12-05T01:35:07Z","closed_at":null,"body":"This spec/factories/locations.rb file breaks `rails c` command.\r\n\r\n```\r\nFactoryGirl.define do\r\n  factory :location do\r\n    name { FFaker::Venue.name }\r\n    latlon \"POINT(#{FFaker::Geolocation.lng} #{FFaker::Geolocation.lat})\"\r\n  end\r\nend\r\n```\r\nCan any friend point out what is wrong?\r\n\r\nError info:\r\n```\r\n/spec/factories/locations.rb:4:in `block (2 levels) in <top (required)>': uninitialized constant FFaker (NameError)\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/syntax/default.rb:18:in `instance_eval'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/syntax/default.rb:18:in `factory'\r\n\tfrom /Users/iPanda/Documents/rails/unfold/spec/factories/locations.rb:2:in `block in <top (required)>'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/syntax/default.rb:49:in `instance_eval'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/syntax/default.rb:49:in `run'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/syntax/default.rb:7:in `define'\r\n\tfrom /Users/iPanda/Documents/rails/unfold/spec/factories/locations.rb:1:in `<top (required)>'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/find_definitions.rb:20:in `block (2 levels) in find_definitions'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/find_definitions.rb:19:in `each'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/find_definitions.rb:19:in `block in find_definitions'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/find_definitions.rb:15:in `each'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/find_definitions.rb:15:in `find_definitions'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl-4.7.0/lib/factory_girl/reload.rb:6:in `reload'\r\n\tfrom /usr/local/lib/ruby/gems/2.3.0/gems/factory_girl_rails-4.7.0/lib/factory_girl_rails/railtie.rb:24:in `block (2 levels) in <class:Railtie>'\r\n\r\n```\r\n\r\nPOINT(-123, 23) is the value of a geolocation data, supported by postgis extension of postgresql database.\r\n\r\nIn `rpec` tests or in `rake db:seed`, this FFaker works fine.  Only the spec/factories file breaks the `rails c` command.\r\n\r\nFile db/seeds.rb\r\n```\r\nLocation.create!([\r\n  {\r\n    name: \"#{FFaker::Venue.name}\",\r\n    latlon: \"POINT(#{FFaker::Geolocation.lng} #{FFaker::Geolocation.lat})\"\r\n  },\r\n  {\r\n    name: \"#{FFaker::Venue.name}\",\r\n    latlon: \"POINT(#{FFaker::Geolocation.lng} #{FFaker::Geolocation.lat})\"\r\n  }\r\n])\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ffaker/ffaker/issues/comments/264749263","html_url":"https://github.com/ffaker/ffaker/issues/307#issuecomment-264749263","issue_url":"https://api.github.com/repos/ffaker/ffaker/issues/307","id":264749263,"user":{"login":"bifork","id":17744735,"avatar_url":"https://avatars.githubusercontent.com/u/17744735?v=3","gravatar_id":"","url":"https://api.github.com/users/bifork","html_url":"https://github.com/bifork","followers_url":"https://api.github.com/users/bifork/followers","following_url":"https://api.github.com/users/bifork/following{/other_user}","gists_url":"https://api.github.com/users/bifork/gists{/gist_id}","starred_url":"https://api.github.com/users/bifork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifork/subscriptions","organizations_url":"https://api.github.com/users/bifork/orgs","repos_url":"https://api.github.com/users/bifork/repos","events_url":"https://api.github.com/users/bifork/events{/privacy}","received_events_url":"https://api.github.com/users/bifork/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T01:35:07Z","updated_at":"2016-12-05T01:35:07Z","body":"5.0.0.1"}}
{"actor":{"display_login":"bifork"}}