Accidentally uninstall rspec
Trying to reinstall RSpec, 开发者_高级运维and I can't seem to re-add its command to my bin folder.
Mac-Users-MacBook-Pro:bin macuser$ rspec
-bash: /usr/bin/rspec: No such file or directory
>> which rspec
#> returns nothing.
I tried sudo gem install rspec --prerelease
a dozen times, bundle install
, and nothing seems to give.
What am I missing?
Hey Trip, I'm pretty sure the command is spec
and not rspec
.
Edit
Ok, so, I took another look, you are right the rspec command is included in rspec2...
So, here is a Gemfile I have which properly installs rspec w/ bundle install
source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'mysql'
group :development, :test do
gem "rspec-rails", ">= 2.0.0.beta.17"
end
In my case, I'm using rvm & it is installed to:
/Users/me/.rvm/gems/ree-1.8.7-head@<my gemset>/bin/rspec
I went ahead and uninstalled all of rspec2.
Then instead of sudo gem install rspec --prerelease
, I did sudo gem install rspec-rails --prerelease
which worked.
Then I followed the explicit directions to delete certain files that were floating around in previous beta releases. Everything is copacetic.
精彩评论