title: Permission denied @ dir_s_mkdir - /spec (Errno::EACCES)
body: <p>Running simple command</p>
  
  <pre><code>rails g model User
  </code></pre>
  
  <p>leads to:</p>
  
  <pre><code>→ bundle exec rails g model User
        invoke  active_record
        create    db/migrate/20160128191020_create_users.rb
        create    app/models/user.rb
        invoke    rspec
        create      spec/models/user_spec.rb
        invoke      factory_girl
        create        /spec/factories/users.rb
  /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': Permission denied @ dir_s_mkdir - /spec (Errno::EACCES)
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:210:in `each'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:61:in `block in invoke!'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `call'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/factory_girl_rails-4.5.0/lib/generators/factory_girl/model/model_generator.rb:46:in `create_factory_file'
      from /Users/khataev/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/factory_girl_rails-4.5.0/lib/generators/factory_girl/model/model_generator.rb:25:in `create_fixture_file'
  </code></pre>
  
  <p>rest is omitted.</p>
  
  <p>I'm using <strong>factory girls rails</strong>. <code>spec</code> and <code>spec/factories folders</code>' permissions are <strong>drwxr-xr-x (755, change to 777 had no effect)</strong>. Re installation of <code>factory_girl_rails</code> had no effect. <code>Ruby 2.2.2</code> (tried different versions already)</p>
  
  <p><a href="https://stackoverflow.com/questions/30147510/errnoeaccess-permission-denied-dir-s-mkdir">Tired this, no effect</a></p>