不小心卸载了rspec
尝试重新安装 RSpec,但我似乎无法将其命令重新添加到我的 bin 文件夹中。
Mac-Users-MacBook-Pro:bin macuser$ rspec
-bash: /usr/bin/rspec: No such file or directory
>> which rspec
#> returns nothing.
我尝试了 sudo gem install rspec --prerelease 十几次,bundle install,但似乎没有任何效果。
我缺少什么?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嘿 Trip,我很确定该命令是
spec
而不是rspec
。编辑
好吧,所以,我又看了一眼,你是对的,rspec 命令包含在 rspec2 中...
所以,这是我的 Gemfile,它可以正确安装 rspec w/bundle install
在我的情况下,我正在使用 rvm &它安装到:
/Users/me/.rvm/gems/ree-1.8.7-head@/bin/rspec
Hey Trip, I'm pretty sure the command is
spec
and notrspec
.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
In my case, I'm using rvm & it is installed to:
/Users/me/.rvm/gems/ree-1.8.7-head@<my gemset>/bin/rspec
我继续卸载了所有 rspec2。
然后,我没有执行 sudo gem install rspec --prerelease ,而是执行了 sudo gem install rspec-rails --prerelease ,效果很好。
然后,我按照明确的指示删除了先前测试版中存在的某些文件。一切都很和谐。
I went ahead and uninstalled all of rspec2.
Then instead of
sudo gem install rspec --prerelease
, I didsudo 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.