2014-10-22 96 views
0

我在Windows机器上安装了sass,compass,bundler,ruby和rails。使用Ruby on Rails设置Sass

我一直在下面的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 

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 

       ^

我怎样才能解决这个问题?

+0

你的红宝石版本是什么?尝试:require => false – sa77 2014-10-22 05:56:04

+0

我的ruby版本是1.8.7和rails是3.0.0 – 2014-10-22 05:57:40

+0

的工作,但现在有语法错误第9行 – 2014-10-22 06:05:33

回答

0

您正在使用新的key: value在Ruby 1.9中引入了语法。你不能在Ruby 1.8中做到这一点。红宝石1.8 is also deprecated,你应该真的停止使用它。你将在死语言的语言中学习错误的东西。

+0

谢谢,我会更新红宝石:) – 2014-10-24 02:15:40