I have a successful Rails 3.0.x project with the following subset of Gems in the Gemfile:
gem "compass"
gem "haml"
gem "haml-rails"
gem "html5-boilerplate"
I tried today to upgrade to Rails 3.1 and keep all functionality, and had numerous problems in doing so. I did not yet find a configuration that did work for me in production mode, so I am working now with developing mode.
I followed the following advices here:
- "Upgrading to Rails 3.1" from Railscast: very good as usual, and told me how to change
production.rb
,development.rb
andapplication.rb
to update the configuration for the asset pipeline. But did not touch compass, sass, and html5-boilerplate. - "Setup html-boilerplate with Rails 3.1" That contained the best fit for me, but does not work, because the method
ie_html
is not available in production mode. The change in the Gemfile is noted down - "Unable to get Rails 3.1, Compass, Sass, Blueprint working on Heroku Cedar" This did not work for me at all, I had problems to the the assets compiled then. There the try was to have everything global, because there is a dependency between Compass and Html-Boilerplate, and Html-Boilerplate has to be global due to the method
ie_html
. - Every try to use only some the Gems in the
group :assets
block was not successful. Most of the time, the dependency between e.g. compass and sass, or compass and html5-boilerplate could not be fulfilled.
So my question is: Is there a working Gemfile which allows to use Haml, Sass, Compass, Html5-Boilerplate and of course Rails 3.1 together?
New Gemfile working in development mode, but not in production mode:
gem "haml-rails"
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
gem 'compass', '~> 0.12.alpha.0'
gem "html5-boilerplate"
end
gem 'jquery-rails'
I have tried to create a fresh Rails 3.1 application, and added there an image resource. There everything is working fine, so no difference between development mode and production mode. In my migrated application, I have now the following state:
- Works well in development mode.
- Disable some of the html5-boilerplate things to work around the problems in production.
- Does not find yet the precompiled images in production mode.