Unable to run rspec w/ Zeus

I've gotten Zeus 0.15.1 running from Rubymine, and it looks to startup OK. Development server starts up OK, though not very fast..
The main issues I'm having is that Rspec tests won't start. Zeus complains about RAILS_ENV being set. I tried following some suggestions from here: http://pivotallabs.com/running-tests-with-zeus/ , but it seems that when running rspec tests w/ Zeus from rubymine, it ignores the custom rspec runner. Any suggestions?

Thanks,
-Kallin Nagelberg

5 comments

Could you please provide the exact message (console ouput) you have when you try to run rspec with Zeus.

Regards, Oleg.

0

Here's Zeus' output in Intellij on start ( no problem ):

/Users/kallin/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/kallin/.rvm/gems/ruby-1.9.3-p484/bin/zeus start
Starting Zeus server v0.15.1
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{U}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{B}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{R}(default_bundle{?}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{R}(default_bundle{U}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{R}(default_bundle{B}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{?}(prerake{?}), test_environment{?}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{U}(prerake{?}), test_environment{U}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{U}(prerake{?}), test_environment{U}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{B}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{B}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{R}(test_helper{?})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{R}(test_helper{U})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{R}(test_helper{B})))
Status: boot{R}(default_bundle{R}(development_environment{B}(prerake{?}), test_environment{R}(test_helper{R})))
Available commands: test(aliases: rspec,testrb)
Status: boot{R}(default_bundle{R}(development_environment{R}(prerake{?}), test_environment{R}(test_helper{R})))
Available commands: runner(aliases: r), console(aliases: c), server(aliases: s), generate(aliases: g), destroy(aliases: d), dbconsole, test(aliases: rspec,testrb)
Status: boot{R}(default_bundle{R}(development_environment{R}(prerake{U}), test_environment{R}(test_helper{R})))
Available commands: runner(aliases: r), console(aliases: c), server(aliases: s), generate(aliases: g), destroy(aliases: d), dbconsole, test(aliases: rspec,testrb)
Status: boot{R}(default_bundle{R}(development_environment{R}(prerake{R}), test_environment{R}(test_helper{R})))
Available commands: rake, runner(aliases: r), console(aliases: c), server(aliases: s), generate(aliases: g), destroy(aliases: d), dbconsole, test(aliases: rspec,testrb)
Status: boot{R}(default_bundle{R}(development_environment{R}(prerake{R}), test_environment{R}(test_helper{R})))
Available commands: rake, runner(aliases: r), console(aliases: c), server(aliases: s), generate(aliases: g), destroy(aliases: d), dbconsole, test(aliases: rspec,testrb)



and here's what happens when I try to run an rpsec without trying anything fancy, simply selecting zeus as pre-load server:

/Users/kallin/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/kallin/.rvm/gems/ruby-1.9.3-p484/bin/zeus rspec /Users/kallin/dev/financeit/experiment/spec/controllers/finance_it/credit_card_charges_controller_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 10:31 AM ...
Warning: Specifying a Rails environment via RAILS_ENV has no effect for commands run with zeus.
As a safety precaution to protect you from nuking your development database,
Zeus will now cowardly refuse to proceed. Please unset RAILS_ENV and try again.


Process finished with exit code 1

0

Hi,

could you please check if RAILS_ENV specified in the run configuration we created for rspec test (Run|Configurations) and if it is just remove it.

Regards, Oleg.

0

Yes, it turns out RM is adding a RAILS_ENV environment variable on every new instance of rspec runner, even though it's not in the default rspec config (no env variables specified).

However, there's a new error once I manually remove it:

/Users/kallin/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/kallin/.rvm/gems/ruby-1.9.3-p484/bin/zeus rspec /Users/kallin/dev/financeit/main/spec/models/events/event_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example Events::Event
Testing started at 12:35 PM ...
/Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:460:in `block in requires='
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:460:in `map'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:460:in `requires='
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration_options.rb:27:in `block in configure'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration_options.rb:26:in `each'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/configuration_options.rb:26:in `configure'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/zeus-0.15.1/lib/zeus/rails.rb:202:in `test'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/zeus-0.15.1/lib/zeus.rb:148:in `block in command'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/zeus-0.15.1/lib/zeus.rb:135:in `fork'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/zeus-0.15.1/lib/zeus.rb:135:in `command'
 from /Users/kallin/.rvm/gems/ruby-1.9.3-p484/gems/zeus-0.15.1/lib/zeus.rb:50:in `go'
 from -e:1:in `<main>'

Process finished with exit code 1

0

Hi,

sorry for late responce.  It looks like RubyMine is failed to determine that we use RSpec :(
Or (perhaps) when Zeus was started the project has not been using RSpec.
In any case I'd suggest to restart Zeus first and if this will not help please file a bug (http://youtrack.jetbrains.com/issues/RUBY) with test project provided.

Reagrds, Oleg.

0

Please sign in to leave a comment.