Closed a14m closed 7 years ago
after much investigation in the issue the problem lies in this line
@import url(http://fonts.googleapis.com/css?family=Patrick+Hand+SC);
I really don't have any idea on how to fix this... but removing this line made the error goes away and the template renders correctly ( almost )
Same for me...
@artmees I think this is due to the generator... https://github.com/vertmac/designmodo-startup_framework-rails/blob/master/lib/generators/startup_framework/install/install_generator.rb#L144
def patch_assets
@gem_assets_dir = File.expand_path("../../../../../app/assets/", __FILE__)
#Replace fonts-path
gsub_file File.join(@gem_assets_dir, @less_dir, "helper.less"), /\.\.\/fonts\//, "@{startup-basePath}common-files/fonts/"
# replace all urls with asset urls with the exception of data urls
Dir.glob("#{@gem_assets_dir}/#{@less_dir}/*.less") do |less_file|
if less_file =~ /icon-font\.less\Z/
gsub_file less_file, /url\((.+?)\)/, 'font-url(\\1)'
else
gsub_file less_file, /url\((.+?)\)/, 'image-url(\\1)'
end
end
Dir.glob("#{@gem_assets_dir}/#{@target_ui_kit}/**/*.less") do |ui_kit_less_file|
#replace all files with the exception of price-common.less
unless ui_kit_less_file =~ /price-common\.less\Z/
gsub_file ui_kit_less_file, /url\((.+?)\)/, 'image-url(\\1)'
end
end
Dir.glob("#{@gem_assets_dir}/demo/**/*.html") do |html_file|
# gsub_file html_file, /<img src="img\/.+?>/ do |s|
# match = /img\/(.+?)"/.match(s)
# '<%= image_tag "' + match[1] + '" %>'
# end
gsub_file html_file, /src=\"img\//, "src=\"/assets/img/"
gsub_file html_file, %r(src="../../), "src=\"/assets/startup-framework/"
# Remove everything before <body> tag and after 'Load JS', inclusive
new_file = File.open("#{html_file}.erb", "w")
puts "Creating ERB files"
include_line = false
IO.foreach(html_file) do |line|
include_line = false if line =~ /Placed at the end/
new_file.write line if include_line
include_line = true if line =~ /<body>/
when ever I try to
@import '/startup-framework/ui-kit/ui-kit-header/less/header-9.less';
even when trying to
rails generate startup_framework:demo 16
( which useheader-9
) it fails with the same error but ini've tried the other headers and non of them fails ?!