Ruby on Rails 错误“无法加载此类文件——更少" [英] Ruby on Rails error "cannot load such file -- less"
问题描述
我对 ruby on rails
还很陌生,我一直在尝试使用 twitter-bootstrap
作为资产,所以我将它包含在我的 Gemfile 中,捆绑并它安装成功.但是我注意到它依赖于我执行bundle"命令时未显示的某些依赖项.
I am fairly new to ruby on rails
, I have been trying to use twitter-bootstrap
as an asset, so I have included it in my Gemfile, bundled and it installs successfully. However I have noticed that it relies on certain dependencies that are not shown when I do the "bundle" command.
它需要的依赖
(1) Libv8
(2) Less
(3) Less-rails
错误信息:
cannot load such file -- less
(in c:/Sites/todo/app/assets/stylesheets/bootstrap_and_overrides.css.less)
[code]
Extracted source (around line #8):
5: <!--[if lt IE 9]>
6: <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
7: <![endif]-->
8: <%= stylesheet_link_tag "application", :media => "all" %>
9: <%= javascript_include_tag "application" %>
10: <%= csrf_meta_tags %>
11: <meta name="viewport" content="width=device-width, initial-scale=1.0">
[/code]
Trace
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__560528188_27183396'
app/controllers/lists_controller.rb:7:in `index'
我已经注意到这个问题的很多答案,并选择了显而易见的解决方案,但不知何故我仍然卡住了,非常感谢一些指导.
I have noticed a lot of answers to this very question already, and have chosen the obvious solutions, but somehow I still get stuck, and would really appreciate some guidance.
推荐答案
我猜你在使用 sass 而不是 LESS.
I guess you are using sass instead of LESS.
您是否尝试过 twitter-bootstrap-rails gem?
Have you tried the twitter-bootstrap-rails gem?
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"
https://github.com/seyhunak/twitter-bootstrap-rails
这篇关于Ruby on Rails 错误“无法加载此类文件——更少"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!