diff --git a/config/application.rb b/config/application.rb index 11c1375cd..16f4ae061 100644 --- a/config/application.rb +++ b/config/application.rb @@ -58,5 +58,8 @@ module Growstuff # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + + # Don't try to connect to the database when precompiling assets + config.assets.initialize_on_precompile = false end end diff --git a/lib/tasks/testing.rake b/lib/tasks/testing.rake index cc082b0be..e2a99ea9b 100644 --- a/lib/tasks/testing.rake +++ b/lib/tasks/testing.rake @@ -1,12 +1,14 @@ require 'rake' -require 'rspec/core/rake_task' +begin + require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) + RSpec::Core::RakeTask.new(:spec) -task :default => :spec + task :default => :spec -task :run_tests do - system("rspec spec/") - system("rake test") + task :run_tests do + system("rspec spec/") + system("rake test") + end +rescue LoadError end - diff --git a/lib/tasks/watchr.rake b/lib/tasks/watchr.rake index 498b82be8..4f48a3761 100644 --- a/lib/tasks/watchr.rake +++ b/lib/tasks/watchr.rake @@ -1,4 +1,7 @@ -desc "Run watchr" -task :watchr do - sh %{bundle exec watchr .watchr} +begin + desc "Run watchr" + task :watchr do + sh %{bundle exec watchr .watchr} + end +rescue LoadError end