Skip to content

Warning: no environment

Cezary Baginski edited this page Jul 10, 2015 · 2 revisions

"Warning: no environment passed" happens when Guard::RSpec can't talk to it's RSpec Formatter using environment variables.

If you're using Zeus, you need a custom plan to pass configuration variables until Zeus is maybe fixed to pass environment variables (https://github.com/burke/zeus/issues/523).

Workaround: either ignore the message (Guard::RSpec will use the default config) or create a custom plan to deal with this:

  1. Run zeus init
  2. Edit custom_plan.rb to contain the following:
require 'zeus/rails'

class CustomPlan < Zeus::Rails
  def test(*args)
    # Guard::RSpec::Runner::TEMPORARY_FILE_PATH
    ENV['GUARD_RSPEC_RESULTS_FILE'] = 'tmp/guard_rspec_results.txt'
    super
  end
end

Zeus.plan = CustomPlan.new

Troubleshooting

Clone this wiki locally