Spork wont start (RM 3.1) | builder error / bundler env not considered

on the console, there would be a way to start it by simply:
bundle exec spork cucumber
bundle exec cucumber works (this setting can be made in features running options)
but for spork, which should have the same environment, I didn't found the possibility to set this option to run.

can someone give me a hint, where to set this, or how to run cucumber / rspec with spork and autotest?

Thanks!


Here the error message:
/Users/rafael/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/rafael/.rvm/gems/ruby-1.9.2-p0/bin/spork cucumber
Using Cucumber
StepMother has been deprecated and will be gently put to sleep at the next major release. Please use Runtime instead. /Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework/cucumber.rb:13:in `new'
Loading Spork.prefork block...
You have already activated builder 3.0.0, but your Gemfile requires builder 2.1.2. Consider using bundle exec. (Gem::LoadError)
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/runtime.rb:31:in `block in setup'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `block in each'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/runtime.rb:17:in `setup'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler.rb:107:in `setup'
/Users/rafael/Sites/onrockets.com/onrockets-base/config/boot.rb:8:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/rafael/Sites/onrockets.com/onrockets-base/config/application.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/rafael/Sites/onrockets.com/onrockets-base/config/environment.rb:2:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/rafael/Sites/onrockets.com/onrockets-base/features/support/env.rb:37:in `<top (required)>'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework.rb:138:in `load'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework.rb:138:in `block (2 levels) in preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/app_framework.rb:64:in `preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework.rb:134:in `block in preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork.rb:67:in `exec_prefork'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework.rb:120:in `preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/test_framework/cucumber.rb:18:in `preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/run_strategy/forking.rb:25:in `preload'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/runner.rb:74:in `run'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork/runner.rb:9:in `run'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/bin/spork:10:in `<top (required)>'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/bin/spork:19:in `load'
/Users/rafael/.rvm/gems/ruby-1.9.2-p0/bin/spork:19:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'

Process finished with exit code 1

8 comments
Comment actions Permalink

Thanks,

You are right, we need to launch spork sever using bundler. I filed an issue - http://youtrack.jetbrains.net/issue/RUBY-7798.

As a workaround you may patch spork launcher script and force it to load bundler. But you need to pass gemfile path somehow. E.g. in rails applications uses such code:

#boot.rb

require 'rubygems'

# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
  ENV['BUNDLE_GEMFILE'] = gemfile
  require 'bundler'
  Bundler.setup
rescue Bundler::GemNotFound => e
  STDERR.puts e.message
  STDERR.puts "Try running `bundle install`."
  exit!
end if File.exist?(gemfile)

0
Comment actions Permalink

Thank for your reply! As compentent as ever :-)

Although... has somebody already figured out, how to start spork with bundler?
I didn't manage to do it actually

@Roman: I saw this is not fixed in the RC release,... hoping for a soon solution, testing speed makes me desperat :-D

cheers

0
Comment actions Permalink

@Roman: I saw this is not fixed in the RC release,... hoping for a soon solution, testing speed makes me desperat :-D

Most likely in 3.1.1 bug fix update.

0
Comment actions Permalink

Unfortunatelly, it doesn't work, may I do something wrong but, I followed your guide:
Please see here: http://youtrack.jetbrains.net/issue/RUBY-7798#comment=27-204631

0
Comment actions Permalink

does anyone managed to get spork working with the latest 3.1.1 RC?

0
Comment actions Permalink

E.g. I managed. Which scenario doesn't work in your case?

0
Comment actions Permalink

I reported to the issue on the tracker:
http://youtrack.jetbrains.net/issue/RUBY-7798?projectKey=RUBY

I get error messages.

0

Please sign in to leave a comment.