Fix rake tasks on preview.

On preview (and anywhere else where RAILS_ENV=production), the bottom
part of this namespace will be run even though the task is not run.

This means that when calling rake assets:precompile, the following error
will occur:

  uninitialized constant Cucumber

Because the Cucumber gem is only included in dev and test.