2014-10-22 129 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