很简单的 require‘sass’但是 load error 了
rb 文件 1 require 'sinatra' 2 require 'haml' 3 require 'sass' 4 5 configure do 6 set :haml, :format => :html5 7 set :scss, :style => :compact 8 end 9 10 get '/css/layout.css' do 11 scss :layout 12 end 13 14 get '/' do 15 haml :index 16 end
ruby *.rb 时,
出现:
PeachtekiMacBook-Air:freya cain$ ruby freya.rb
/Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in require': cannot load such file -- sass (LoadError)
from /Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in
rescue in require'
from /Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in require'
from freya.rb:3:in