Deploy Rails App with capistrano : Foundation : Sass::SyntaxError: Undefined variable : "$oil" - ruby-on-rails

I try to deploy a Rails app with capistrano
I use foundation-rails, and when I deploy, i've got this error :
Sass::SyntaxError: Undefined variable: "$oil".
Even if I had manually $oil in my sass file, it doesn't solve the problem.

I fixed the problem by downgrading foundation-rails gem !
Thanks for your help

Related

undefined method `setup' for Config:Module (NoMethodError)

I am getting above error while set up gem config in my application. The error only comes in production.
It is working fine on my local.
I am getting the error in Config.setup do |config|
My Ruby version is 2.4 and rails version is 5.0
I am using Unicorn as my application server
Error = E, [2018-07-30T10:01:57.579983 #6128] ERROR -- : undefined methodsetup' for Config:Module (NoMethodError)`
Try changing the source of gem to the latest location in your gemfile as below:
gem 'config', github: 'railsconfig/config'
Hope this helps !!!
I have fixed the above problem by upgrading the Rails version from 5.0 to Rails 5.1.6
It was working on local because in my local machine Rails 5.1 was already installed. It was a Rails versioning problem.

Sprockets::FileNotFound: couldn't find file '../../fonts/bootstrap/glyphicons-halflings-regular.eot'

Tonight I got a strange new error when trying to push to Heroku. Normally pushing to Heroku works fine, but for some reason tonight apparently a glyphicon is missing from bootstrap-sass project and Heroku thus fails to accept a push. Here's the error Heroku gives upon git push heroku master:
Running: rake assets:precompile
I, [2014-06-17T02:59:50.058577 #768] INFO -- : Writing /tmp/build_f0c4c8f6-f9ab-40b7-9346-9eb892ea1990/public/assets/karen-1-1a16815583cabbc3e2b1afa7877ecb2f.png
I, [2014-06-17T02:59:50.063553 #768] INFO -- : Writing /tmp/build_f0c4c8f6-f9ab-40b7-9346-9eb892ea1990/public/assets/south-c-1-52ab385056b021aa07ad6ae253eb6054.png
I, [2014-06-17T02:59:59.186515 #768] INFO -- : Writing /tmp/build_f0c4c8f6-f9ab-40b7-9346-9eb892ea1990/public/assets/application-91b0b1a3925fb425e8b51c103f7009af.js
rake aborted!
Sprockets::FileNotFound: couldn't find file '../../fonts/bootstrap/glyphicons-halflings-regular.eot'
(in /tmp/build_f0c4c8f6-f9ab-40b7-9346-9eb892ea1990/app/assets/stylesheets/application.css.scss:1)
I have all assets to precompile, in config/application.rb I have config.serve_static_assets = true.
In app/assets/stylesheets/application.css.scss I'm making sure to import bootstrap: #import "bootstrap";
My gem file:
gem 'bootstrap-sass', github: 'twbs/bootstrap-sass'
gem 'bootstrap-sass-extras'
Is this an issue with the bootstrap-sass gem, as I see someone else recently had the same issue with no solution: https://github.com/twbs/bootstrap-sass/issues/592
A temporary solution that at least lets me push to Heroku successfully and have my assets precompiled is to remove github: 'twbs/bootstrap-sass' from the Gemfile where bootstrap-sass is imported and just have the line gem 'bootstrap-sass'. Hopefully this bug will be fixed soon at the Github project.
Edit 5 months later: this bug was fixed a few nights after this question was asked.

Failed to deploy Rails app with gem bootstrap-sass 3.0.3.0 on heroku

I have a rails application that I wanted to upgrade from bootstrap-sass 2 to bootstrap-sass 3
After modifying some css class name, my application worked perfectly on my machine.
I removed the #import bootstrap-responsive ( because bootstrap is natively responsive since 3.0 ) I updated my gemfile and my bundle BUT when I try to deploy my application on Heroku I have the following error :
AssetSync: using /tmp/build_68121564-cc6f-46c8-86d7-ad9ccb180ea1/config/initializers/asset_sync.rb
rake aborted!
File to import not found or unreadable: bootstrap-responsive.
Load paths:
Sass::Rails::Importer(/tmp/build_68121564-cc6f-46c8-86d7-ad9ccb180ea1/app/assets/stylesheets/developers.css.sass)
What I tried so far :
Remove gem bootstap-sass from the asset group (didn't work )
I tried the rake tmp:clear command (didn't work either )
Bundle updated and bundle installed everything again ( still not working )
What should I do ?
The problem is clearly due to some temp files but even after cleaning them I can't push my app on heroku.
Solved
I just had a #import bootstrap-responsive in another .css.scss file im my repo.

Cannot make compass work on Heroku

I'm using compass-rails gem in my Rails app. I'm using rails 3.2 and trying to deploy on Heroku cedar stack.
Assets precompilation seemed to pass without any problems.
I keep getting the following error (in the log) when trying to access the site:
ActionView::Template::Error (File to import not found or unreadable: compass.
What am I doing wrong?
I found the problem. Apparently, Heroku must have the following configuration set:
config.assets.initialize_on_precompile = false
I added it and everything works fine now.

Heroku + Rails 3.1: asset_path undefined?

i try to deploy a rails 3.1.3 app to heroku but keep getting the following error when browsing the pages:
ActionView::Template::Error (undefined method `asset_path' for #<#<Class:0x00000002ecd630>:0x00000002e52480>):
i use the "cedar" stack as recommended by heroku. any idea why i get this issue? do i have to make some more configuration?
thanks in advance!
EDIT: works again. i forgot to add "require 'sprockets/railtie'" in the application.rb...
You forgot to add "require 'sprockets/railtie'" in the application.rb

Resources