gpt4 book ai didi

ruby-on-rails - Rails 4 + react rails gem : Could not find generator 'react:install'

转载 作者:行者123 更新时间:2023-12-03 13:46:35 26 4
gpt4 key购买 nike

我正在尝试关注this Airpair tutorial作者:Fernando Villalobos,通过 react-rails gem 来体验 Rails 和 React。

我创建了一个全新的 Rails 4 应用程序,现在正在尝试安装 react-rails

这是我的 Gemfile:

source 'https://rubygems.org'

gem 'rails', '4.2.2'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'

gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

gem 'bootstrap-sass'
gem 'react-rails', '~> 1.4.0'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end

我已经运行了bundle installbundle update(以防万一)。

但是,每当我尝试运行 rails g React:install as recommended here ,我不断收到以下错误:

Could not find generator 'react:install'. Maybe you meant 'test_unit:job' or 'test_unit:model' or 'generator'
Run `rails generate --help` for more options.

知道这里出了什么问题吗?

最佳答案

尝试运行spring stop。您可能已附加到旧流程。

关于ruby-on-rails - Rails 4 + react rails gem : Could not find generator 'react:install' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33600745/

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