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

  • Home
  • SEARCH
  • 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 8662067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:38:47+00:00 2026-06-12T16:38:47+00:00

What sort of things OUTSIDE of the Rails codebase can affect asset precompilation? My

  • 0

What sort of things OUTSIDE of the Rails codebase can affect asset precompilation?

My colleague is experiencing asset precompilation issues, while it works fine for me. We’re running the same code. We have Gemfile and Gemfile.lock in version control, so those are identical, and application.rb is the same for both of us (so, for example, config.assets.enabled = true is set for both of us.)

Here are the two relevant files. The issue we’re experiencing is below.

app/views/layouts/application.html.erb:

...
<%= stylesheet_link_tag    "application", :media => "all" %>
...

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 booking_availability_table
 *= require bootstrap_and_overrides
 *= require browse_coaches
 *= require landing_pages
 *= require layout
 *= require lightbox
*/

note: Some of these files are .css, some are .css.less, and some are .css.scss.

The issue:

When loading the homepage, he gets the error

TypeError in Static_pages#home
can't convert nil into String
  (in /path/to/app/assets/stylesheets/layout.css.scss)

Extracted source (around line #20)

20: <%= stylesheet_link_tag "application", :media => "all" %>

From experimental deleting, we see that it’s only the .css.scss files that are causing the problem. Deleting the lines in application.css corresponding to SASS files stops the error from occurring and lets the page load. However, if we do so:

The home page then has tons of links to /stylesheets/___.css, which result in 404’s, instead of the correct /assets/____.css as it does for me.

What we tried:

I tried stepping through loading the homepage on both our machines with debugger. Our code execution diverged here:

.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.2.1/lib/sprockets/helpers/rails_helper.rb:

 def stylesheet_link_tag(*sources)
   ...
   sources.collect do |source|
     if debug && asset = asset_paths.asset_for(source, 'css')
       asset.to_a.map { |dep|
         super(dep.pathname.to_s, { :href => path_to_asset(dep, :ext => 'css', :body => true, :protocol => :request, :digest => digest) }.merge!(options))
       }
     else
       super(source.to_s, { :href => path_to_asset(source, :ext => 'css', :body => body, :protocol => :request, :digest => digest) }.merge!(options))
     end
   end.join("\n").html_safe

Specifically, the statement asset_paths.asset_for(source, 'css') raises an error for my colleague, but not for me.

We also tried uninstalling and reinstalling rails and rvm.

  • 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-06-12T16:38:48+00:00Added an answer on June 12, 2026 at 4:38 pm

    Oh, feels stupid… we fixed it. rm -rf‘ing the entire directory and re-cloning it fixed it. I guess there was an extra file in there floating around or something.

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

Sidebar

Related Questions

I'm pretty sure what sort of things can be done with NHibernate but I
How can I sort things by priority in a JList? For example I have
Maybe I'm overcomplicating things, but then again, I do sort of like clean interfaces.
Sort of noob-rails question ;): I've got 2 actions in my controller - index
what sort of conditions can we use for branching in jinja2? I mean can
I want people to be able to sort things and not just me sorting
Does anyone have any experience with this sort of thing? I'm talking about applets
I have a couple of open questions relating to the same sort of thing,
...@Sort bit) AS SELECT .............. and I want to Order only if Sort =
Sort of a methods/best practices question here that I am sure has been addressed,

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.