GithubHelp home page GithubHelp logo

Comments (23)

mjankowski avatar mjankowski commented on May 22, 2024

Hi David, what gems do you have installed? What does your production.rb config look like re: the asset pipeline?

Can you paste the relevant part of your application.css.sass ?

from bourbon.

mjankowski avatar mjankowski commented on May 22, 2024

Can you also confirm how you are including the stylesheets from your layout?

from bourbon.

nhocki avatar nhocki commented on May 22, 2024

I've had that same problem on production. I've solved it by removing the 'assets' group from the Gemfile (weird).

Maybe that'll help.

from bourbon.

mjankowski avatar mjankowski commented on May 22, 2024

Things maybe relevant to this, curious to hear what you guys are doing...

  • In your config/application.rb, which Bundler.require line are you using?
  • Do you have the sass-rails gem installed, or just sass gem?
  • How do you include your stylesheets from the layout?
  • Are you doing any "precompile" of assets or relying totally on heroku to do this?

from bourbon.

czj avatar czj commented on May 22, 2024

I've had the same problem for several days and nothing seems to fix it. All versions of Bourbon give me the same problem : works for assets pre-compilation but I get an error message when running production on Heroku.

I have tried gem "bourbon" at the root of the Gemfile or in the "assets" group. I have also tried @import "bourbon" in the root sass file or in each of the imported sass files.

I am not using SCSS but SASS syntax, don't know if this might be an issue (I guess not).

from bourbon.

mjankowski avatar mjankowski commented on May 22, 2024

Additional question to my previous batch -- make sure you've run rake rails:update to get the asset pipeline related changes to run in your production/staging/whatever environments on heroku.

from bourbon.

czj avatar czj commented on May 22, 2024

I forgot to say it is a brand new Rails 3.1 application, made from scratch for/with the assets pipeline / sass / bourbon or compass in mind.

from bourbon.

nickmjones avatar nickmjones commented on May 22, 2024

I had the same issue. I did a 'bundle update' and the deployment seemed to work the second time. My config is totally plain vanilla, nearly bone-stock Rails 3.1. Having an "assets" group didn't seem to make a difference.

from bourbon.

mjankowski avatar mjankowski commented on May 22, 2024

For anyone still having this issue - please provide us with the info that my 9/26 and 10/7 comments ask for so we can attempt to debug.

from bourbon.

chrism avatar chrism commented on May 22, 2024

Same problem:

1

Bundler.require *Rails.groups(:assets => %w(development test))

2

sass-rails installed

3

like this

@import "bourbon";
@import 'flutie';
@import 'scaffolds';

using application.css.scss

4

would like to use heroku to precompile during deployment

many thanks for any help!

from bourbon.

nm avatar nm commented on May 22, 2024

I also got the same problem:

  1. Bundler.require *Rails.groups(:assets => %w(development test))
  2. sass-rails installed
  3. @import "bourbon"; (application.css.scss)
  4. When I precompile the assets locally it works, but I'd like to rely totally on heroku

Thx in advance!

from bourbon.

czj avatar czj commented on May 22, 2024

One way to fix the problem might be to have a "main" css file without anything specific and not forgetting to include it in your application.rb :

# We need admin javascript & css assets to be precompiled too
config.assets.precompile += ['login.css', 'admin.css', 'admin.js']

Then your admin.css should be simple :

/*
*= require_tree ./admin
*/

It worked for me.

from bourbon.

seivan avatar seivan commented on May 22, 2024

I still got this issue.
Rails 3.2
Bourbon is outside of the asset group. Works fine in dev, not on Heroku.
ctionView::Template::Error (File to import not found or unreadable: bourbon.

*= require bootstrap/bootstrap
*= require_self

*/

@import "bourbon";

from bourbon.

seivan avatar seivan commented on May 22, 2024

Any progress on this?

from bourbon.

erikostling avatar erikostling commented on May 22, 2024

I'm also getting the same problem as @seivan when deploying a Rails 3.2.1 app to Heroku with bourbon 1.3.6.

(ps. Seems to be Active admin causing the problem though… ds)

(ps 2. This solved my problem: https://gist.github.com/1197686 ds.)

from bourbon.

rkleine avatar rkleine commented on May 22, 2024

https://gist.github.com/1197686 also solve for me.

from bourbon.

gdakram avatar gdakram commented on May 22, 2024

+1 for @rkleine15 and @erikostling tip.

from bourbon.

dtt101 avatar dtt101 commented on May 22, 2024

Just a note - this isn't anything to do with Bourbon I don't think, rather the case that your app is trying to connect to the database when assets:precompile is run on heroku. There is an article here explaining the issue: http://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar

The solution for me was to add the following line to config/application.rb

config.assets.initialize_on_precompile = false

I then followed the Bourbon installation instructions for Rails 3.1.x as documented here: https://github.com/thoughtbot/bourbon

I am running Rails 3.2.1

from bourbon.

gmassanek avatar gmassanek commented on May 22, 2024

@ugisozols gist fixed this for me, thanks! https://gist.github.com/1197686.
Note: I was having this issue on my own VPS, not Heroku. Using Rails 3.1.1

from bourbon.

gonzofy avatar gonzofy commented on May 22, 2024

dtt101: thanks for that. Just ran into the same thing and it worked for me.

from bourbon.

goodtimeaj avatar goodtimeaj commented on May 22, 2024

config.assets.initialize_on_precompile = false works for me. Thanks.

from bourbon.

mikekellyio avatar mikekellyio commented on May 22, 2024

@dtt101: excellent! that's the trick.

from bourbon.

darthniwo avatar darthniwo commented on May 22, 2024

https://gist.github.com/1197686 is working just fine, I'm running rails 3.2.1, also tested on heroku

from bourbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.