我一直收到这个消息
$ rails generate friendly_id
在过程17863中通过Spring预加载器运行找不到生成器 ' friendly_id&#39 ;.也许你的意思是' channel',' generator'或者'帮手'跑
rails generate --help
了解更多选项。
的Gemfile
source 'https://rubygems.org'
gem 'rails', '5.0.0.1'
gem 'puma', '3.4.0'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.4.1'
gem 'friendly_id', '~> 5.1.0'
gem 'bootstrap', '~> 4.0.0.alpha5'
group :development, :test do
gem 'sqlite3', '1.3.11'
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
答案 0 :(得分:0)
通过运行以下命令确保安装了您的gem friendly_id
bundle install