I changed some gem versions in my Gemfile, and then I did:
$ bundle install
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.9)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.9)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.9)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.19)
Using actionmailer (3.0.9)
Using arel (2.0.10)
Using activerecord (3.0.9)
Using activeresource (3.0.9)
Using annotate (2.4.0)
Using bundler (1.0.15)
Using diff-lcs (1.1.2)
Using nokogiri (1.5.0)
Using rdoc (3.8)
Using thor (0.14.6)
Using railties (3.0.9)
Using rails (3.0.9)
Using rspec-core (2.0.1)
Using rspec-expectations (2.0.1)
Using rspec-mocks (2.0.1)
Using rspec (2.0.1)
Using rspec-rails (2.0.1)
Using spork (0.8.4) **********<<<<<<<<<<<
Using sqlite3-ruby (1.2.5)
Using webrat (0.7.1)
Your bundle is complete! Use bundle show [gemname]
to see where a
bundled gem is installed.
Now I want to run spork 0.8.4 (as listed in the Gemfile):
$ bundle exec spork
/Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/spork-0.9.0.rc8/lib/spork/test_framework/cucumber.rb:2:
warning: already initialized constant DEFAULT_PORT
/Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/spork-0.9.0.rc8/lib/spork/test_framework/cucumber.rb:3:
warning: already initialized constant HELPER_FILE
/Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/spork-0.9.0.rc8/lib/spork/test_framework/rspec.rb:2:
warning: already initialized constant DEFAULT_PORT
/Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/spork-0.9.0.rc8/lib/spork/test_framework/rspec.rb:3:
warning: already initialized constant HELPER_FILE
Using RSpec
Loading Spork.prefork block…
Spork is ready and listening on 8989!
It appears to me that the spork version being executed is the version
that used to be in the Gemfile–not the version that is currently
specified in the gemfile. I don’t really care what version of spork
executes, but autotest stopped working when I updated some gems to newer
versions in my Gemfile, so I tried specifying all the old versions
again. Why doesn’t ‘bundle exec’ execute spork version 0.8.4?
And if I try:
$ spork -v
spork: version unknown
$ spork --help
Usage: spork [test framework name] [options]
Options:
-b, --bootstrap
-d, --diagnose
-h, --help
-p, --port [PORT]
Supported test frameworks:
( ) Cucumber
(*) RSpec
Legend: ( ) - not detected in project (*) - detected
What kind of idiot creates a gem that won’t give you its version??
Here is the autotest error(if that matters):
/Users/Me/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -rrubygems -S
/Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/rspec-core-2.6.4/bin/rspec
–tty
‘/Users/Me/rails_projects/sample_app/spec/controllers/pages_controller_spec.rb’
‘/Users/Me/rails_projects/sample_app/spec/controllers/users_controller_spec.rb’
‘/Users/Me/rails_projects/sample_app/spec/models/user_spec.rb’
‘/Users/Me/rails_projects/sample_app/spec/requests/layout_links_spec.rb’
Exception encountered: #<OptionParser::InvalidOption: --tty>
backtrace:
…