Scss file not imported properly in production

285 Views Asked by At

My assets are loading correctly in development. However, when I go to push live (on AppFog), I get the following error: "File to import not found or unreadable: bourbon."

This errors is found in the "_bourbon_neat.scss" file, located in my /app/assets/helpers directory. The specific line throwing the error is

@import "bourbon";

The "bourbon" file isn't actually in the directory structure, but is included in the 'bourbon' gem.

I tried pushing with and without precompiled assets, neither of which seemed to work. I also had a similar problem in another application, using the 'zurb-foundation' library instead. I did manage to get the application running by just pushing continually, but I have no idea why it worked in those instances.

Any help would be appreciated.

1

There are 1 best solutions below

0
On

Have you installed the Bourbon gem in the production environment?

If so, some additional options to try might be:

  • Bourbon's documentation indicates you should being importing bourbon/bourbon rather than just the parent directory.
  • Try defining the path directly to the Bourbon gem for Sass. Checkout this other answer that shows how to add to the path variable that Sass cycles through when importing. Note the "I" flag and the value being passed in.