我正在尝试一个简单的RoR应用程序,并使用nifty generator
脚本进行脚手架,布局文件和验证。找不到发电机漂亮:脚手架
我加入到我的gemfile中gem 'nifty-generators'
,我运行了'bundle install'
并安装它。
然后我进入
$ rails g nifty:scaffold Recipe name:string index new
我得到了以下异常
找不到发电机漂亮:脚手架
有什么能在这里
我正在尝试一个简单的RoR应用程序,并使用nifty generator
脚本进行脚手架,布局文件和验证。找不到发电机漂亮:脚手架
我加入到我的gemfile中gem 'nifty-generators'
,我运行了'bundle install'
并安装它。
然后我进入
$ rails g nifty:scaffold Recipe name:string index new
我得到了以下异常
找不到发电机漂亮:脚手架
有什么能在这里
的问题。如果您正在使用Rails 3(当然,因为你是初学者),然后用脚手架,而不是漂亮:脚手架
像这样
rails g scaffold
没有多少在这里挖..确保bundle install
或bundle update
命令在你的Gemfile.lock
创建nifty-generators
的条目。然后验证该宝石已被正确安装使用bundle show nifty-generators
..它应该显示您的系统上的宝石的位置..确保您至少有读取该文件夹的权限..
由于您添加gem bundler /你的gemfile我想你会w蚂蚁做:
$ bundle exec rails g nifty:scaffold Recipe name:string index new
为宝石被发现。
也许仔细检查该宝石是否安装在应该出现的位置:$ bundle show nifty-generators – miked 2011-12-29 18:42:10