I’m a Mac programmer who has dabbled in Ruby on and off over the years. I’m trying to get the code on pages 16-18 of the b2.0 PDF to work. I used RVM to set up a workspace for the book’s code.
gem install jeweler and
gem install rspec worked fine.
jeweler --rspec twits worked after I used
git config --global github.user to set my github user name (git was already installed).
Since the version of RSpec that was installed is 2.3.0, I created the directory tree autotest/.autotest in twits and created the discover.rb file in .autotest.
gem install ZenTest worked fine.
When I run autotest, I get this:
loading autotest/rspec2 /Users/steve/.rvm/gems/ruby-1.9.3-head@ctbook/gems/ZenTest-4.4.2/lib/autotest.rb:632: Use RbConfig instead of obsolete and deprecated Config. bundle exec /Users/steve/.rvm/rubies/ruby-1.9.3-head/bin/ruby -S /Users/steve/.rvm/gems/ruby-1.9.3-head@ctbook/gems/rspec-core-2.3.0/bin/rspec --tty '/Users/steve/Development/ctbook/twits/spec/twits_spec.rb' Could not find gem 'rspec (~> 2.1.0, runtime)' in any of the gem sources listed in your Gemfile.
The results of
rake spec are similar:
/Users/steve/.rvm/gems/ruby-1.9.3-head@ctbook/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config. (in /Users/steve/Development/ctbook/twits) Could not find gem 'rspec (~> 2.1.0, runtime)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems
Here’s the results of
*** LOCAL GEMS *** bundler (1.0.7) diff-lcs (1.1.2) git (1.2.5) jeweler (1.5.1) rake (0.8.7) rdoc (2.5.11) rspec (2.3.0) rspec-core (2.3.0) rspec-expectations (2.3.0) rspec-mocks (2.3.0) ZenTest (4.4.2)
I can’t figure out why I’m getting the error message that rspec can’t be found.