2016-08-25 68 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遷移它「耙分貝:遷移」