Okay. This is a new problem caused by a gem update. Calling bundle update breaks my rails application. Here are the gems that changed:
# Gemfile.lock
-
For solving it, I remove Gem using compass-rails.
In my case I was using chosen-rails, replacing it with select2, now all work fine with 'rails', '4.2.0' and 'sass-rails', '~> 5.0.0'
I've found that the updated gems, which have in their instructions to change application.css to application.css.scss, don't recognize just 'application' as a parameter for a scss file for stylesheet_link_tag. You need to change:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
to this:
<%= stylesheet_link_tag 'application.css.scss', media: 'all', 'data-turbolinks-track' => true %>
This will allow you to work with the latest gems.
Removing compass from my gemfile (remember bundle install) and then using the new sprockets beta fixed it for me.
gem "sprockets", "~>3.0.0.beta" in gemfile. Then bundle update sprockets.
Enjoy :)
I believe this is actually a problem with sass and compass dependencies. I had the same issue in Rails 4.1.5. The default Gemfile includes:
gem 'sass-rails', '~> 4.0.3'
But a simple bundle update within the last month (Oct/Nov 2014) breaks the application. I was able to fix it by adding the following lines to my Gemfile to preserve the dependencies between compass and sass:
gem 'sass', '~> 3.2.19'
gem 'compass', '~> 0.12.7'
gem 'compass-rails', '~> 2.0.0'
Update Dec 2014:
I ran into this same issue again after trying to upgrade to Zurb Foundation 5.5. It seems like the main culprit is the compass-rails gem. Even after I pulled out the gem, I found that a different gem I was using (chosen-rails) was pulling it back in. After getting rid of all the sass and compass lines (and chosen-rails), the following works for me:
gem 'sass-rails', '~> 5.0.0'
gem 'foundation-rails', '~> 5.5'
bundle update sass did the trick.
The problem is with sass. Here's a link to the the official issue.
Locking sass-rails to version 4.0.3 has worked for me on rails-4.0.x through rails-4.1.x. In your Gemfile:
gem 'sass-rails', '4.0.3'
UPDATE
A better solution I have found is to use the 4-0-stable branch:
gem 'sass-rails', github: 'rails/sass-rails', branch: '4-0-stable'