I have a Rails application that received the following error:
Less::ParseError in Home#index Showing /Users/burtondav/sites/requestsys/app/views/layouts/application.html.erb where line #20 raised: Cannot call method 'charAt' of undefined (in /Users/burtondav/sites/requestsys/app/assets/stylesheets/bootstrap_and_overrides.css.less) Extracted source (around line #20): 17: } 18: </style> 19: 20: <%= stylesheet_link_tag "application", :media => "all" %>
Some of the GEMS that I use:
gem 'rails', '3.2.11' gem 'twitter-bootstrap-rails' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'less-rails' gem 'commonjs' gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' end
There seems to be a problem with LESS that Bootstrap is using.
I read a few other similar questions. So, I upgraded Ruby to 1.9.3p374. But that did not fix the problem.
Any ideas?
THANKS!
UPDATE
This is bootstrap_and_overrides.css.less
@import "twitter/bootstrap/bootstrap"; @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings"); @iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
ruby-on-rails twitter-bootstrap
Reddirt
source share