Problems running RSpec 2 with autotest/autospec

On Tue, Dec 14, 2010 at 10:15 AM, Michelle P. [email protected]
wrote:

Could not find gem ‘rspec (~> 2.1.0, runtime)’ in any of the gem sources
listed in your Gemfile.

The error is there, did you update your Gemfile definitions to the
latest version and run bundle update rpsec or bundle update
rspec-rails?


Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry

David C. wrote in post #967835:

ZenTest-4.4.2 will add “.” to the $LOAD_PATH, at which point the
material in
the book will work as written (except that the file is
“autotest/discover.rb”, not
“autotest/.autotest/discover.rb”) with ruby-1.9.

Ok - I have updated to ZenTest-4.4.2, I’ve made sure that I have
autotest/discover.rb and that I use ‘autotest’ in place
of ‘autospec’…I’m sorry to say it, but iis still not 'verking (with or
without autotest installed):

C:\DEVELOPMENT\twits>autotest
loading autotest/rspec2
bundle exec C:\devtools\Ruby192\bin\ruby -S
C:/devtools/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2
.3.0/bin/rspec --tty ‘C:/DEVELOPMENT/twits/spec/twits_spec.rb’
Could not find gem ‘rspec (~> 2.1.0, runtime)’ in any of the gem sources
listed in your Gemfile.
Interrupt a second time to quit
Terminate batch job (Y/N)?
^C

C:\DEVELOPMENT\twits>ls spec/*
spec/spec_helper.rb spec/twits_spec.rb

:slight_smile: sorry David… but got any more pointers for me?? Do I have to high a
version of rspec installed?


*** LOCAL GEMS ***
autotest (4.4.6) <---- tried both installed/uninstalled
bundler (1.0.7)
diff-lcs (1.1.2)
git (1.2.5)
jeweler (1.5.1)
minitest (2.0.0, 1.6.0)
rake (0.8.7)
rdiscount (1.6.5)
rdoc (2.5.11, 2.5.8)
redcar (0.9.2, 0.9.1)
rspec (2.3.0, 2.2.0)
rspec-core (2.3.0, 2.2.1)
rspec-expectations (2.3.0, 2.2.0)
rspec-mocks (2.3.0, 2.2.0)
rubyzip (0.9.4)
ZenTest (4.4.2)

Luis L. wrote in post #968298:

On Tue, Dec 14, 2010 at 10:15 AM, Michelle P. [email protected]
wrote:

Could not find gem ‘rspec (~> 2.1.0, runtime)’ in any of the gem sources
listed in your Gemfile.

The error is there, did you update your Gemfile definitions to the
latest version and run bundle update rpsec or bundle update
rspec-rails?

Thanks Luis, I’m completely new with this. All I ran was “%gem update”
and thought that would do it as it now returns with “Nothing to update”.
Also in my listing of installed gems above, I have rspec (2.3.0, 2.2.0)

How do I go about updating my gemfile definitions? If I type “% bundle
update rspec” then “Could not locate gem files” is output.

Luis L. wrote in post #968399:

You’re using Bundler, bundler needs a “manifest” of gems and versions
that your application use. Look for “Gemfile” in the root of your
application.

yay! Thanks Luis (and David) for all your patience. I’ve finally got
it working and can now go onto Page 19 of this book.

I looked for the automatically generated gemfile and found that it was
completely out of date with version numbers so I updated it to the
versions I have.

Thanks again for all the help and putting up with my new-be-ness.

Cheers,
Michelle

THE OLD (ORIGINAL):

group :development do
gem “rspec”, “~> 2.1.0”
gem “bundler”, “~> 1.0.0”
gem “jeweler”, “~> 1.5.1”
gem “rcov”, “>= 0”
end

I CHANGED IT TO THIS AND IT WORKS:

group :development do
gem “rspec”, “~> 2.3.0”
gem “bundler”, “~> 1.0.7”
gem “jeweler”, “~> 1.5.1”
gem “rcov”, “>= 0”
end

On Tue, Dec 14, 2010 at 1:38 PM, Michelle P. [email protected]
wrote:

Thanks Luis, I’m completely new with this… mmm - no?

Are you following a Rails guide? didn’t the guide mention something
about a Gemfile?

All I ran was “%gem update” and thought that would do it as it now
returns with “Nothing to update”. How do I go about updating my “gemfile
definitions”?

You’re using Bundler, bundler needs a “manifest” of gems and versions
that your application use. Look for “Gemfile” in the root of your
application.

More information in Bundler website:

http://gembundler.com/

Luis L.
AREA 17

Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry