I'm trying to run rspec on my machine for the first time. I did gem install rspec in the global gemset. However, when I try to do
spec intranet_reader_spec.rb
I get
-bash: spec: command not found
And when I try to do
bundle exec rspec spec intranet_reader_spec.rb
I get
Could not locate Gemfile
(Note, I don't have a gemfile. I'm just running one test script from a ruby book)
I found these instructions for adding spec to the path, i.e. put the following in bashrc
export PATH=$PATH:/Users/<UserName>/.gem/ruby/1.8/bin
However, that didn't work. I note that on my mac. if I navigate to .gem/ruby/1.8 and do 'ls', it doesn't have a 'bin.' In the 1.8 folder, it has
cache doc gems specifications
Can anyone tell me what I might be doing wrong?