Asset Precompilation + Mongoid
If you're deploying a mongoid application to heroku, and you'd like to use asset precompilation, you may run into precompilation problems. Stick a file in lib/tasks
named mongoid_precompilation_patch.rake
and put the following in it:
namespace :assets do
task :silence_mongoid do
module ::Mongoid
def load!(config_file)
puts "Skipping connection to Mongo DB"
end
end
end
task :environment => :silence_mongoid
end
Written by Bradley Grzesiak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#