Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:38:36+00:00 2026-05-30T18:38:36+00:00

I’ve been struggling with this for some time now and I just can’t find

  • 0

I’ve been struggling with this for some time now and I just can’t find a post that has as simple of a problem as mine. I am new to working with Heroku and Rails and am trying to figure out how to get asset pipeline to work with a css file that I have in the “App/assets/stylesheets” directory. I’ve tried following posts from http://guides.rubyonrails.org/asset_pipeline.html and http://www.youtube.com/watch?v=p_3dIPgXgkg, but I can’t figure out how to get Heroku to deploy a very simple site with a new css file. I’ve verified that asset pipeline is the issue by disabling the pipeline and Heroku deploys it just fine. My local server employs the css just fine, so the problem must be my settings with the asset pipeline.

I have created a new css file at the following location: “app/assets/stylesheets/custom.css”

Here is what the contents of the manifest file look like at “app/assets/stylesheets/application.css”:

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
 * the top of the compiled file, but it's generally better to create a new file per style scope.
 *= require_self
 *= require_tree . 
*/

Here is what my “config/application.rb” file looks like:

require File.expand_path('../boot', __FILE__)


# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module MegaProject
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'
  end
end

I am using “ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]” on “Rails 3.1.3”

And finally, here is a look at my Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.3'
gem 'sqlite3'
gem 'jquery-rails'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.5'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

group :production do
  gem 'pg'
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

Can anybody help me out with this one? Thank you, Nicholas Kincaid

Here is the output from j_mcnally’s request:

Nicholass-MacBook-Pro:mega_project nbkincaid$ git push heroku master
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 513 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Fetching source index for http://rubygems.org/
       Installing rake (0.9.2.2) 
       Installing multi_json (1.1.0) 
       Installing activesupport (3.1.3) 
       Installing builder (3.0.0) 
       Installing i18n (0.6.0) 
       Installing activemodel (3.1.3) 
       Installing erubis (2.7.0) 
       Installing rack (1.3.6) 
       Installing rack-cache (1.1) 
       Installing rack-mount (0.8.3) 
       Installing rack-test (0.6.1) 
       Installing hike (1.2.1) 
       Installing tilt (1.3.3) 
       Installing sprockets (2.0.3) 
       Installing actionpack (3.1.3) 
       Installing mime-types (1.17.2) 
       Installing polyglot (0.3.3) 
       Installing treetop (1.4.10) 
       Installing mail (2.3.0) 
       Installing actionmailer (3.1.3) 
       Installing arel (2.2.2) 
       Installing tzinfo (0.3.31) 
       Installing activerecord (3.1.3) 
       Installing activeresource (3.1.3) 
       Installing coffee-script-source (1.2.0) 
       Installing execjs (1.3.0) 
       Installing coffee-script (2.2.0) 
       Installing rack-ssl (1.3.2) 
       Installing json (1.6.5) with native extensions 
       Installing rdoc (3.12) 
       Installing thor (0.14.6) 
       Installing railties (3.1.3) 
       Installing coffee-rails (3.1.1) 
       Installing jquery-rails (1.0.19) 
       Installing pg (0.13.1) with native extensions 
       Using bundler (1.0.7) 
       Installing rails (3.1.3) 
       Installing sass (3.1.15) 
       Installing sass-rails (3.1.5) 
       Installing sqlite3 (1.3.5) with native extensions 
       Installing uglifier (1.2.3) 
       Your bundle is complete! It was installed into ./.bundle/gems/
-----> Compiled slug size is 7.0MB
-----> Launching... done, v27
       http://strong-moon-9939.heroku.com deployed to Heroku

To git@heroku.com:strong-moon-9939.git
   95351fa..8e4131f  master -> master

Here’s what the heroku logs messages give me:

2012-02-24T06:57:43+00:00 heroku[router]: GET strong-moon-9939.heroku.com/ dyno=web.1 queue=0 wait=0ms service=7ms status=500 bytes=728
2012-02-24T06:57:43+00:00 heroku[nginx]: 24.13.158.102 - - [24/Feb/2012:06:57:43 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" strong-moon-9939.heroku.com
2012-02-24T06:58:38+00:00 app[web.1]: 
2012-02-24T06:58:38+00:00 app[web.1]: 
2012-02-24T06:58:38+00:00 app[web.1]: Started GET "/" for 24.13.158.102 at 2012-02-23 22:58:38 -0800
2012-02-24T06:58:38+00:00 app[web.1]:   Processing by UsersController#home as HTML
2012-02-24T06:58:38+00:00 app[web.1]: Rendered users/home.html.erb within layouts/application (0.0ms)
2012-02-24T06:58:38+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-02-24T06:58:38+00:00 app[web.1]: 
2012-02-24T06:58:38+00:00 app[web.1]: ActionView::Template::Error (custom.css isn't precompiled):
2012-02-24T06:58:38+00:00 app[web.1]:     3: <head>
2012-02-24T06:58:38+00:00 app[web.1]:     4:   <title><%= title %></title>
2012-02-24T06:58:38+00:00 app[web.1]:     5:   <%= stylesheet_link_tag "application" %>
2012-02-24T06:58:38+00:00 app[web.1]:     6:   <%= stylesheet_link_tag "custom" %>
2012-02-24T06:58:38+00:00 app[web.1]:     7:   <%= javascript_include_tag "application" %>
2012-02-24T06:58:38+00:00 app[web.1]:     8:   <%= csrf_meta_tags %>
2012-02-24T06:58:38+00:00 app[web.1]:     9: </head>
2012-02-24T06:58:38+00:00 app[web.1]:   app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__150896894354786412_13162880'
2012-02-24T06:58:38+00:00 app[web.1]: 
2012-02-24T06:58:38+00:00 app[web.1]: 
2012-02-24T06:58:38+00:00 app[web.1]: cache: [GET /] miss
2012-02-24T06:58:38+00:00 heroku[router]: GET strong-moon-9939.heroku.com/ dyno=web.1 queue=0 wait=0ms service=7ms status=500 bytes=728
2012-02-24T06:58:38+00:00 heroku[nginx]: 24.13.158.102 - - [24/Feb/2012:06:58:38 +0000] "GET / HTTP/1.1" 500 728 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" strong-moon-9939.heroku.com
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:38:37+00:00Added an answer on May 30, 2026 at 6:38 pm

    Okay, I finally figured this one out. After looking through http://guides.rubyonrails.org/asset_pipeline.html some more, I realized that I needed to add in:

    //= require custom
    

    to the application.css file. I entered this outside of comments and this fixed my problem. I was able to precompile locally and everything worked perfectly on Heroku after that. Thank you to everybody that helped me get there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I know there's a lot of other questions out there that deal with this
I have been unable to fix a problem with Java Unicode and encoding. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.