gpt4 book ai didi

ruby-on-rails-4 - rails 4 - 找不到生成器 rspec :install

转载 作者:行者123 更新时间:2023-12-04 07:13:38 24 4
gpt4 key购买 nike

我正在尝试安装用于 TDD 和 BDD 测试的 rspec 框架,以及用于在更改完成的同时运行的连续测试的 autotest gem。

我一直在关注各种教程,其中一些在堆栈溢出中,另一些在网络上,但在执行

时我无法找到解决方案

rails generate rspec:install

它抛出一个错误“找不到生成器 rspec:install”

我在这里附加了 gem 文件:[更新]

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.3'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end

group :development, :test do
gem 'rspec-rails', '2.13.1'
end

最佳答案

接受的答案对我不起作用。这是做了什么:

试试这个命令:

spring stop

然后再次运行:

rails generate rspec:install

关于ruby-on-rails-4 - rails 4 - 找不到生成器 rspec :install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22962048/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com