Cannot call method 'charAt' of undefined

2.1k Views Asked by At

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 1.16.17
ruby 1.9.3p286
Rails 3.2.8
less 2.2.2
less-rails 2.2.6
less-rails-bootstrap 2.2.0

My Gemfile

group :assets do
  gem 'less-rails-bootstrap'
  gem 'therubyracer'
  gem 'uglifier'
end

I am getting an error

Less::Error in User/home#index Cannot call method 'charAt' of undefined (in /home/user/rails_app_development/releases/20121102052832/app/assets/stylesheets/layout.css.less)

Where I am doing wrong here?

1

There are 1 best solutions below

0
On BEST ANSWER

This error appeared in our project too. It happened because we had only the mixins.less imported, but not the variables.less of twitter bootstrap.

Importing variables.less right before the mixins.less solved the problem like magic.