2016-08-25 66 views
1

我安装了宝石,当我运行Rails的:是否有可能使用active_scoffold宝石在轨4.2.6

rails g active_scaffold:install 

它说

通过Spring预加载过程6001

运行

找不到发电机'scoffold'。也许你的意思是'脚手架','css:scaffold'或'erb:脚手架'

运行rails generate --help以获得更多选择。

的Gemfile

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', '~> 2.0' 
# bundle exec rake doc:rails generates the API under doc/api. 
gem 'sdoc', '~> 0.4.0', group: :doc 
gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: 'master' 
+0

在[文档](https://github.com/activescaffold/active_scaffold)它说,_“滑轨> = 4.0.5是支持,ruby> = 2.0支持“_所以它应该工作。你运行过'bundle install'吗? – Vucko

+0

当我运行命令“rails g active_scaffold用户名:字符串”时,我运行了捆绑包,它表示已定义错误 – praveenkumar

+0

您是否在'rails g active_scaffold用户名:string'之前运行'bundle exec rake db:create'? – Vucko

回答

1

我找到了解决办法

我改变了步骤来安装的宝石,那步骤

1.将宝石镶嵌在宝石文件,宝石'active_scaffold'并运行捆绑安装

2.运行命令“rails g active_scaffold用户名:字符串”

3.In的Gemfile改变宝石 'active_scaffold' 到 “宝石 'active_scaffold',github上: 'activescaffold/active_scaffold',分支: '主'”,并再次安装该软件包。

4.创建一个数据库“bundle exec rake db:create”

5.运行“rails g active_scaffold:install”

6.Finally迁移它“耙分贝:迁移”