title: Precompiling assets throws "Errno::EPERM: Operation not permitted @ sys_fail2" in Rails
body: <p>I have deployed my rails application on the server but it is showing me an error when i try to precompile the assets also, whenever I try to run my server in production environment it throws <strong><code>ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):</code></strong> error everytime. As this Question suggest <a href="https://stackoverflow.com/questions/17904949/rails-app-not-serving-assets-in-production-environment">here</a> to precomplie your assets. but i am still getting this error:   </p>
  
  <pre><code>deploy@TTP:/srv/ttp$ RAILS_ENV=production bundle exec rake assets:precompile
      I, [2015-06-17T07:40:19.366868 #14706]  INFO -- : Writing /srv/ttp/public/assets/application-b70462741c5220649c0fae6b371f8bb0db1f69df9980817ca94517d13ec3e90e.js
      I, [2015-06-17T07:40:27.543196 #14706]  INFO -- : Writing /srv/ttp/public/assets/application-8fad86d02acda5dc8d383ef570b85dc9991784b53d994dc532ed69632be450db.css
      rake aborted!
      Errno::EPERM: Operation not permitted @ sys_fail2 - (/srv/ttp/public/assets/.sprockets-manifest-81cc84ad6ecbcbede263dab4150a3105.json.11450760.14706.293714, /srv/ttp/public/assets/.sprockets-manifest-81cc84ad6ecbcbede263dab4150a3105.json)
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-3.0.1/lib/sprockets/path_utils.rb:277:in `atomic_write'
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-3.0.1/lib/sprockets/manifest.rb:261:in `save'
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-3.0.1/lib/sprockets/manifest.rb:183:in `compile'
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-3.0.1/lib/rake/sprocketstask.rb:147:in `with_logger'
      /usr/local/rvm/gems/ruby-2.2.2/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
      Tasks: TOP =&gt; assets:precompile
  </code></pre>
  
  <p><strong>log/production.log</strong></p>
  
  <pre><code>I, [2015-05-12T12:36:11.882313 #26372]  INFO -- : Started GET "/" for 1.22.20.40 at 2015-05-12 12:36:11 -0400
  I, [2015-05-12T12:36:11.895927 #26372]  INFO -- : Processing by RecordsController#index as HTML
  I, [2015-05-12T12:36:11.908520 #26372]  INFO -- :   Rendered records/index.html.erb within layouts/application (3.1ms)
  I, [2015-05-12T12:36:11.926940 #26372]  INFO -- : Completed 200 OK in 31ms (Views: 28.8ms | ActiveRecord: 0.0ms)
  I, [2015-05-12T12:36:12.307845 #26372]  INFO -- : Started GET "/stylesheets/application.css" for 1.22.20.40 at 2015-05-12 12:36:12 -0400
  F, [2015-05-12T12:36:12.309134 #26372] FATAL -- :
  ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
    actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
    actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
    railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
    railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
    activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
    railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
    actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
    rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
    rack (1.6.0) lib/rack/runtime.rb:18:in `call'
    activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
    actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
    rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
    railties (4.2.0) lib/rails/engine.rb:518:in `call'
    railties (4.2.0) lib/rails/application.rb:164:in `call'
    rack (1.6.0) lib/rack/content_length.rb:15:in `call'
    puma (2.11.2) lib/puma/server.rb:507:in `handle_request'
    puma (2.11.2) lib/puma/server.rb:375:in `process_client'
    puma (2.11.2) lib/puma/server.rb:262:in `block in run'
    puma (2.11.2) lib/puma/thread_pool.rb:104:in `call'
    puma (2.11.2) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
  </code></pre>