title: rails 3.1 deployment on heroku .css isn't precompiled error
body: <p><strong>Update</strong></p>
  
  <p>I got this error because I had a public.css and public.js file that was not compiled with the rest of the .css and .js files. The solution was to add this line to the production.rb file</p>
  
  <pre><code># Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  config.assets.precompile += %w( public.js public.css  )
  </code></pre>
  
  <p>As you see from the comment all files names application are already added. So, I just had to add the ones that was not called application. </p>
  
  <p>Hope it helps someone!</p>
  
  <p><strong>Original question</strong></p>
  
  <p>I have this gem file</p>
  
  <pre><code>gem 'rails', '3.1.0'
  
  group :production do
    gem 'pg'
  end
  group :development, :test do
    gem 'sqlite3'
  end
  
  gem "heroku"
  gem 'thin'
  gem 'sass-rails', "  ~&gt; 3.1.0"
  gem 'coffee-rails', "~&gt; 3.1.0"
  gem 'tabulous'
  gem 'json'
  gem "paperclip", "~&gt; 2.4"
  gem "devise"
  gem "redcarpet"
  
  group :assets do
  
    gem 'uglifier'
  end
  
  gem 'jquery-rails'
  
  gem "rspec-rails", :group =&gt; [:test, :development]
  group :test do
  end
  </code></pre>
  
  <p>when I deploy with "git push heroku master" I see this</p>
  
  <pre><code>Preparing app for Rails asset pipeline
         Running: rake assets:precompile
         mkdir -p /tmp/build_2m34y4hj01m4o/public/assets
         mkdir -p /tmp/build_2m34y4hj01m4o/public/assets
         mkdir -p /tmp/build_2m34y4hj01m4o/public/assets
         mkdir -p /tmp/build_2m34y4hj01m4o/public/assets/admin
         mkdir -p /tmp/build_2m34y4hj01m4o/public/assets/admin
  -----&gt; Rails plugin injection
         Injecting rails_log_stdout
         Injecting rails3_serve_static_assets
  -----&gt; Discovering process types
         Procfile declares types      -&gt; (none)
         Default types for Ruby/Rails -&gt; console, rake, web, worker
  -----&gt; Compiled slug size is 31.2MB
  -----&gt; Launching... done, v5
         http://maktaba.herokuapp.com deployed to Heroku
  </code></pre>
  
  <p>but in the heroku logs I get this ActionView::Template::Error. css isn't precompiled
  Strange.. I thougt it was looking at the deployment feedback</p>
  
  <pre><code>2011-11-23T22:59:48+00:00 app[web.1]: Rendered public/index.html.erb within layouts/first (0.7ms)
  2011-11-23T22:59:48+00:00 app[web.1]: Completed 500 Internal Server Error in 30ms
  2011-11-23T22:59:48+00:00 app[web.1]:
  2011-11-23T22:59:48+00:00 app[web.1]: ActionView::Template::Error (public/public.css isn't precompiled):
  2011-11-23T22:59:48+00:00 app[web.1]:     2: &lt;html&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     3: &lt;head&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     4:   &lt;title&gt;Maktaba&lt;/title&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     5:   &lt;%= stylesheet_link_tag    "public/public" %&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     6:   &lt;%= javascript_include_tag "public/public" %&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     7:   &lt;%= csrf_meta_tags %&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:     8:   &lt;%= csrf_meta_tags %&gt;
  2011-11-23T22:59:48+00:00 app[web.1]:   app/views/public/index.html.erb:5:in `_app_views_public_index_html_erb___1726244208117637261_45234420'
  2011-11-23T22:59:48+00:00 app[web.1]:   app/controllers/public_controller.rb:13:in `block (2 levels) in index'
  2011-11-23T22:59:48+00:00 app[web.1]:
  2011-11-23T22:59:48+00:00 app[web.1]:   app/controllers/public_controller.rb:12:in `index'
  </code></pre>
  
  <p>Can any of you see what I am doing wrong?</p>