2012-09-22 50 views
2
Rails項目

我已經開始了一個新的Rails項目使用以下gemfile問題導入與Susy到使用北斗

source 'https://rubygems.org' 

gem 'rails', '3.2.8' 

group :development do 
    gem 'sqlite3' 
end 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'compass-rails' 
    gem 'susy' 
    gem 'sassy-buttons' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 
gem 'devise' 

然後我試圖@import "susy";到我application.css.scss文件,但它失敗,出現以下錯誤:

Sass::SyntaxError in Devise/sessions#new 

Showing /Users/ashleyconnor/Development/rails/myapp/app/views/layouts/application.html.erb where line #5 raised: 

File to import not found or unreadable: susy. 
Load paths: 
    Sass::Rails::Importer(/Users/ashleyconnor/Development/rails/myapp/app/assets/stylesheets/application.css.scss) 
    /Users/ashleyconnor/Development/rails/myapp/app/assets/stylesheets 
    /Users/ashleyconnor/.rvm/gems/[email protected]/gems/compass-0.12.2/frameworks/blueprint/stylesheets 
    /Users/ashleyconnor/.rvm/gems/[email protected]/gems/compass-0.12.2/frameworks/compass/stylesheets 
    /Users/ashleyconnor/.rvm/gems/[email protected]/gems/compass_twitter_bootstrap-2.0.3/stylesheets 
    /Users/ashleyconnor/.rvm/gems/[email protected]/gems/sassy-buttons-0.1.4/stylesheets 
    Compass::SpriteImporter 
    (in /Users/ashleyconnor/Development/rails/myapp/app/assets/stylesheets/application.css.scss) 

導入sassy-buttons作品,但susy不是由於某種原因。

回答

1

如果你有這個問題,那麼你可能使用POW。

事實證明,POW沒有看到所需的插件,所以SASS無法編譯。

這個問題的修復方法是每次將新的Compass插件導入SASS文件時運行rails s。更好的辦法是拋棄POW直到它被修復。