【发布时间】:2014-10-22 05:38:49
【问题描述】:
我的 Windows 机器上安装了 sass、compass、bundler、ruby 和 rails。
我一直按照https://github.com/twbs/bootstrap-sass的步骤进行操作
一个。 Ruby on Rails
我已经在 Gemfile 中添加了宝石...
source 'https://rubygems.org'
gemspec
# Compass for the dummy app
gem 'compass', require: false
group :development do
gem 'byebug', platform: :mri_21, require: false
end
# Adding bootstrap gem
gem 'bootstrap-sass', '~> 3.2.0'
gem 'sass-rails', '>= 3.2'
gem 'autoprefixer-rails'
当我运行 bundle install 命令时,我收到:
➤ bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Gemfile syntax error compile error
on line 6: syntax error, unexpected ':', expecting $end
gem 'compass', require: false
^
我该如何解决这个问题?
【问题讨论】:
-
你的 ruby 版本是什么?试试 :require => false
-
我的 ruby 版本是 1.8.7,rails 是 3.0.0
-
有效,但现在第 9 行出现语法错误
-
做同样的事情 :require => false
-
我认为这是 1.8.7 的语法问题 ..每当您看到
key: :value对时..do:key => :value..您是否遵循相同版本的 ruby 和 rails 的教程??
标签: ruby-on-rails ruby twitter-bootstrap sass