Rails wrapbootstrap模板少解析错误

时间:2014-09-25 10:18:43

标签: ruby-on-rails twitter-bootstrap ruby-on-rails-4

我已经购买了一个wrapbootstrap模板,现在我有问题将它应用到Ruby on Rails中的项目中。我插入/ vendor / assets和/app/assets/stylesheets/appplication.css中的所有js和css文件我已插入此行

*= require_tree ../../../vendor/assets/stylesheets/.

我在/app/assets/javascript/application.js中完成的工作

*= require_tree ../../../vendor/assets/javascripts/.

我的Gemfile是

gem 'rails', '4.1.0'
gem 'mysql2'
gem 'table_print'
gem 'devise'

gem 'sass-rails', '~> 4.0.3'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

gem 'jquery-rails'

gem 'turbolinks'

gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc

gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'   

gem 'jquery-ui-rails'
gem 'less-rails-bootstrap', '~> 3.2.0'

gem 'tzinfo-data', platforms: [:mingw, :mswin]

最后,我得到了一个 Less :: ParseError in Home #index

变量@enable-navbar-dropdowns未定义   (在/home/james/Desktop/SP2/frontend_v2/vendor/assets/stylesheets/less/ace-nav.less)

http://i.imgur.com/8q8oh25.png

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

这是我工作的application.css

*= require ace/bootstrap/bootstrap
*= require ace/ace
*= require_self

*请注意,我删除了require tree .