Failed to get Rails 3.1, Compass, Sass, Blueprint, working on Geroku cedars

For the most part I followed the direction here

What caused the following error coming from the initializer, she asked me to create:

from /app/config/initializers/sass.rb:1:in `<top (required)>'
2011-09-05T16:45:42+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/railties-    3.1.0/lib/rails/railtie/configuration.rb:78:in `method_missing': undefined method `sass' for #  <Rails::Application::Configuration:0x00000003845528> (NoMethodError)

The Heroku page doesnโ€™t help much at the beginning. These are basically the same instructions only without an initializer. However, without him, he cannot find any drawing material, so I still can not start.

Anyone who has done this further than me?

Edit for additional history:

I went through a series of mistakes to get here, so I decided that I should write all of them. The first problem I had was that the html5-templateplate was in: assets, which meant that the ie_html method was not found, so I pulled this from: assets.

This led to this error, since the html5 template file is compass dependent:

2011-09-05T17:15:47+00:00 app[web.1]:    /app/vendor/bundle/ruby/1.9.1/bundler/gems/compass-b7f44a48d375/lib/compass/version.rb:56:in   `const_missing': uninitialized constant Compass::Frameworks (NameError)
2011-09-05T17:15:47+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bundler/gems/compass-html5-boilerplate-405f9ddbca56/lib/html5-boilerplate.rb:1:in `<top (required)>'
+5
source share
3 answers

Ultimately, the final solution was to make sass-rails global (or at least it seemed to be). I feel like I finally got it to work on a joint record, but here it is.

I pulled a compass from: assets and made it global. Which then led to errors with the compilation of SCSS files, which ultimately led me to upgrade to Ceder, which led to the absence of errors in the project.

, , , , compass . , .

:

gem 'heroku'
gem 'haml'
gem 'compass', :git => 'git://github.com/chriseppstein/compass.git'
gem 'html5-boilerplate', :git => 'git://github.com/sporkd/compass-html5-boilerplate.git'
gem 'sass-rails', "  ~> 3.1.0"

github html5- ( h5bp, ).

:

Rails.configuration.sass.tap do |config|
  config.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
end
+9

, sass-rails , - sass-rails.

, .

+1

: http://www.mattvanhorn.com/2012/01/07/heroku-cedar-assets-ruby-1-9/

Rails 3.1 Compass, Heroku.

github (http://github.com/mattvanhorn/placepanda/commits), .

, load_paths application.rb, . twitter bootstrap , , :

if Rails.configuration.respond_to?(:sass)
  config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
  config.sass.load_paths << "#{Gem.loaded_specs['compass_twitter_bootstrap'].full_gem_path}/lib/../stylesheets"
end

application.rb, , Heroku , config.sass , .

0

All Articles