Ruby on rails 3 带罗盘导轨的导轨3

Ruby on rails 3 带罗盘导轨的导轨3,ruby-on-rails-3,compass-sass,Ruby On Rails 3,Compass Sass,我正在尝试使用新的compass rails gem设置rails 3.2应用程序 我想用compass watch命令编译assets文件夹中的文件,就像我想部署到heroku一样,但到目前为止我没有成功 compass rails gem页面说明: 用罗盘观察仪开发 使用Compass watcher更新样式表时,只要保存Sass文件,样式表就会重新编译。在这种模式下,已编译的样式表将被写入项目的公用文件夹,因此将由项目的web服务器直接提供服务,从而取代正常的rails编译 在此模式下,

我正在尝试使用新的compass rails gem设置rails 3.2应用程序

我想用compass watch命令编译assets文件夹中的文件,就像我想部署到heroku一样,但到目前为止我没有成功

compass rails gem页面说明:

用罗盘观察仪开发

使用Compass watcher更新样式表时,只要保存Sass文件,样式表就会重新编译。在这种模式下,已编译的样式表将被写入项目的公用文件夹,因此将由项目的web服务器直接提供服务,从而取代正常的rails编译

在此模式下,rails 3.0或更早版本的用户将通过禁用Sass::Plugin(如下所示)体验到一点速度提升:

但我不知道该把这个配置选项放在哪里

有什么想法吗

==编辑==

我试图在application.rb中添加config.after\u initialize块

require File.expand_path('../boot', __FILE__)

# require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
# require "sprockets/railtie"


if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module Salsacaribecouk
  class Application < Rails::Application

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]


    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'

    config.after_initialize do
      Sass::Plugin.options[:never_update] = true
    end
  end
end
需要文件。展开路径('../boot',文件)
#需要“rails/all”
需要“控制器/轨道连接的操作”
要求采取“行动”\u邮递员/railtie
需要“活动资源/railtie”
#需要“链轮/系杆”
如果定义?(捆绑机)
#如果在部署到生产环境之前预编译资产,请使用此行
Bundler.require(*Rails.groups(:资产=>%w(开发测试)))
#如果您希望在生产中惰性地编译资产,请使用此行
#Bundler.require(:default,:assets,Rails.env)
结束
Salsacaribecouk模块
类应用程序
但当我运行rails服务器时,会收到一条错误消息:


block-in':未初始化的常量Sass::Plugin(namererror)

如果希望在所有环境中或在
config\environments\[开发|测试|生产].rb
在特定环境中执行。

我是否将其放在模块myapp\r类应用程序config.XXX指令处于同一级别尝试过,但我收到一条错误消息,sass::plugin unitialized constant查看答案:,可能会有所帮助。
require File.expand_path('../boot', __FILE__)

# require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
# require "sprockets/railtie"


if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require(*Rails.groups(:assets => %w(development test)))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module Salsacaribecouk
  class Application < Rails::Application

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]


    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'

    config.after_initialize do
      Sass::Plugin.options[:never_update] = true
    end
  end
end