Questions tagged [less-rails]
15 questions
3
votes
1 answer
Cannot call method 'charAt' of undefined
I am having rails3 application which running fine in my local ubuntu machine. I deployed my application using capistrano-unicorn to remote server via copy. The remote server is also having a same configuration which I had in local machine like
rvm…

Achaius
- 5,904
- 21
- 65
- 122
2
votes
1 answer
Error when using mix function in LESS in rails
Using the less-rails gem.
Using the following code to mix two colours:
@base: #ffdc52;
@add: #195742;
.colour{
color: mix(@base, @add);
}
getting the following error:
Less::ParseError: error evaluating function `mix`: Cannot read property…

Mild Fuzz
- 29,463
- 31
- 100
- 148
2
votes
1 answer
avoid @import being included twice - rails engine
i have a rails engine which is being consumed by an application. The engine and the application both are dependent on a mixin file so both of them does
@import 'mixins'
But on css compression these mixins will be included twice.
Is there anyway to…

Vinay
- 41
- 5
2
votes
2 answers
Installing ruby gem less-rails on windows machine using therubyracer
since a while I am trying to install the less-rails gem on my windows7 machine.
I already managed to install the needed therubyracer.gem using this binary file:
https://github.com/stereobooster/therubyracer/downloads
I also downloaded the v8.dll…

mickmackk
- 191
- 2
- 4
1
vote
1 answer
Less parser error while precompiling assets rails
Here is my Gemfile.
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use mysql as the database for Active Record
gem 'mysql2'
# Use SCSS for stylesheets
gem 'pg'
gem…

Asnad Atta
- 3,855
- 1
- 32
- 49
1
vote
1 answer
Make less-rails add line numbers as comment
Is there any way to configure less-rails so that it shows the line number of original sources as comments? And is it possible to enable source mapping?
Consider the following example:
file1.less
body {
background-color: black;
}
file2.less
body…

Yan Foto
- 10,850
- 6
- 57
- 88
1
vote
0 answers
less-rails, cannot make use of @import
Following the instructions all works fine if the less is all in one file, however, using @import it loses all reference to variables.
I placed my .less files under /vendor/frameworks/
Added the following to application.rb
config.less.paths <<…

Georg Keferböck
- 1,967
- 26
- 43
1
vote
1 answer
twitter bootstrap rails CSS not loading after cloning project on new machine
I have two machines, Machine1 works just fine. Machine2 is a new machine that I'm setting up. Machine1 is running OSX 10.6 Snow Leopard and Machine2 is running OSX 10.8 Mountain Lion. I've uploaded my project to Github, so I should be…

Mundo Calderon
- 183
- 2
- 10
1
vote
0 answers
less-rails gem not importing less files as expected
I'm trying to include less in my rails 3 projects so that I can have a global.css.less file that looks like this:
@import "variables";
@import "app";
However, whenever I do that, app.less can't access variables defined in variables.less.
The…

andy
- 8,775
- 13
- 77
- 122
1
vote
3 answers
Recompile the parent LESS file in Rails 3.2
I'm using the "less-rails" gem to get less integrated into my rails app.
In my "applications.css.less" file, I'm importing other LESS files into it. When I make a change to any of the imported files I need to re-save the "application.css.less" file…

say
- 2,585
- 7
- 35
- 48
0
votes
1 answer
upgrade configuration of less due to migrate rails from 3 to 5
Rails migration from v3 to v5 is in progress. Less loading is not worked.
couldn't find file '../less/style.less' under '{root}/app/assets/stylesheets' with type 'text/css'
(seems strange mime type in error message, I suppose may be less must be…

fl-web
- 462
- 5
- 16
0
votes
0 answers
Less::Error expected expected ')' got '''
Recently I upgraded less-rails gem to 3.0.0. The error raised on stylesheet_link_tag, javascript_include_tag, image_tag and anywhere else that involving asset pipeline.
However when I prepend /assets/ e.g change from
= stylesheet_link_tag…

Rijaludin Muhsin
- 1
- 2
0
votes
2 answers
Why is this COMMENTED piece of code, <%= stylesheet_link_tag "application", :media => "all" %>, not allowing my ROR app to run
I'm in the process of getting Twitter-rails-bootstrap GEM up and running on my Windows OS.
The load error is below:
cannot load such file -- less
(in C:/Sites/cardMS/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Thanks

ElMerroPero
- 59
- 1
- 7
0
votes
1 answer
less-rails doesn't generate digest assets with assets:precompile
I am building a gem and have some assets in namespace under the less, fonts and the images folder. In each of the less files wherever there is a url('') for font or image, I am using asset-url('') with the same contents.
After that when I run rake…

Roney Banerjee
- 333
- 5
- 15
0
votes
1 answer
Correct way to import non-less files in less-rails
I have been trying to import a normal css file in a less file as described in the less-rails' documentation using asset helpers, e.g.:
@import asset-url('some/path/to/something.css')
without any luck. The output does not change asset-url(...) to…

Yan Foto
- 10,850
- 6
- 57
- 88