jeudi 29 décembre 2016

Capistrano assets:precompile , undefined $modal-delay for css

Following is my deploy.rb

# config valid only for current version of Capistrano
lock '3.7.0'

set :linked_dirs,  %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

namespace :puma do
  desc 'Create Directories for Puma Pids and Socket'
  task :make_dirs do
    on roles(:app) do
      execute "mkdir #{shared_path}/tmp/sockets -p"
      execute "mkdir #{shared_path}/tmp/pids -p"
    end
  end

  before :start, :make_dirs
end



namespace :deploy do
  desc "Make sure local git is in sync with remote."
  task :check_revision do
    on roles(:app) do
      unless `git rev-parse HEAD` == `git rev-parse origin/master`
        puts "WARNING: HEAD is not the same as origin/master"
        puts "Run `git push` to sync changes."
        exit
      end
    end
  end

  desc 'generate sitemaps'
  task :generatesitemap do
    on roles(:app) do
      execute "cd #{release_path}"
      execute "ruby sitemap.rb"
    end
  end

  desc 'Initial Deploy'
  task :initial do
    on roles(:app) do
      before 'puma:start'
      invoke 'deploy'
    end
  end

  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # invoke 'puma:restart'
      Rake::Task['puma:restart'].reenable
    end
  end

  before :starting,     :check_revision
  after  :finishing,    :compile_assets
  after  :finishing,    :cleanup
  after  :finishing,    :generatesitemap
  after  :finishing,    :restart
end

# ps aux | grep puma    # Get puma pid
# kill -s SIGUSR2 pid   # Restart puma
# kill -s SIGTERM pid   # Stop puma

Following is my capfile

# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

require 'capistrano/rails'
require 'capistrano/bower'
require 'capistrano/bundler'
require 'capistrano/rvm'
require 'capistrano/puma'
require 'capistrano/puma/nginx'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

When I deploy to staging environment. I am constantly getting this error "Sass::SyntaxError: Undefined variable: "$modal-delay"

I have searched through my stylesheets and I don't have this variable $modal-delay used anywhere in my stylesheets. I also tried defining this variable in application.scss. but still this error keeps coming.

I have also cleaned, clobbed my assets, i have also cleared my tmp/cache folder.

Following is my application.scss file

$modal-delay : 3;


 @import "animate.scss";
 @import "bootstrap.scss";
 @import "font-awesome.scss";
 @import "material-design-iconic-font.scss";
 @import "reset.scss";
 @import "responsive-menu.scss";
 @import "owl.carousel.scss";
 @import "easy-responsive-tabs.scss";
 @import "mediaelementplayer.scss";
 @import "style1.scss";
 @import "responsive.scss";
 @import "custom.scss";
 @import "messenger/build/css/messenger.css";
 @import "messenger/build/css/messenger-theme-future.css";
 @import "bootstrap-suggest.scss";

I am looking at this thread http://ift.tt/2iaTt6u

Thanks

Aucun commentaire:

Enregistrer un commentaire