I read in this amazing article that I should save my RAM by adding gems to the :assets
group.
So I tried to do that:
group :assets do
gem 'sass-rails'
gem 'coffee-rails', '~> 3.2.1'
gem 'coffee-script-source', '1.5.0'
gem 'uglifier', '>= 1.0.3'
# Front-end
gem 'jquery-rails'
gem 'bootstrap-sass'
end
But then I get this error, when pushing to heroku:
Sprockets::FileNotFound in Me#index
Showing /app/app/views/layouts/application.html.haml where line #58 raised:
couldn't find file 'jquery'
(in /app/app/assets/javascripts/libs/libs.js:4)
Extracted source (around line #58):
55:
56: / %script{src: "//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.js"}
57:
58: = javascript_include_tag 'libs/libs'
59: %script{:src => "http://js.pusher.com/2.1/pusher.min.js", :type => "text/javascript"}
60: %script{:src => "//cdn.jsdelivr.net/modernizr/2.7.1/modernizr.min.js", :type => "text/javascript"}
61: %script{:src => "//cdn.jsdelivr.net/webshim/1.11.0/polyfiller.js", :type => "text/javascript"}
And I read here that it is normal, as :assets means pretty much :development + :test
How can I tell Heroku that I'd like a specific gem to be loaded on assets precompilation, but not during runtime anymore?
I use Rails 3.2.
Thanks for support