不小心卸载了rspec

发布于 2024-09-16 18:23:04 字数 302 浏览 2 评论 0原文

尝试重新安装 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪痕残 2024-09-23 18:23:04

嘿 Trip,我很确定该命令是 spec 而不是 rspec

编辑

好吧,所以,我又看了一眼,你是对的,rspec 命令包含在 rspec2 中...

所以,这是我的 Gemfile,它可以正确安装 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

在我的情况下,我正在使用 rvm &它安装到:

/Users/me/.rvm/gems/ree-1.8.7-head@/bin/rspec

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

清泪尽 2024-09-23 18:23:04

我继续卸载了所有 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 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文