Rails无法调用未定义的方法'charAt'

Red*_*irt 8 ruby-on-rails twitter-bootstrap

我有一个Rails应用程序收到以下错误:

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" %>
Run Code Online (Sandbox Code Playgroud)

我正在使用的一些GEMS:

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
Run Code Online (Sandbox Code Playgroud)

这似乎是Bootstrap使用的LESS问题.

我读过其他几个类似的问题.所以,我将Ruby升级到1.9.3p374.但是,这并没有解决问题.

有任何想法吗?

谢谢!

UPDATE

这是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");
Run Code Online (Sandbox Code Playgroud)

mat*_*gne 1

在评论中跟进您之后。看来答案在于用 twitter-bootstrap-rails 或 less-rails 描述你的问题打开一个 github 问题。您还可以关注原始问题:https ://github.com/seyhunak/twitter-bootstrap-rails/issues/72

否则,我们为您提供两种解决方案:

  1. 使用SASS版本: https: //github.com/jlong​​/sass- twitter-bootstrap
  2. 使用其网站上可用的本机 CSS 版本:http://twitter.github.com/bootstrap/customize.html