2017-03-07 70 views
0

我想使用Ruby來安裝程序。 但現在我卡在這個錯誤:rakefile中止不知道如何構建任務寶石

rake file aborted. Don't know how to build task gems

有人能幫我嗎?

耙文件看起來像這樣:

# Add your own tasks in files placed in lib/tasks ending in .rake, 
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 

require File.expand_path('../config/application', __FILE__) 
require 'rake' 

require 'rake/testtask' 
require 'rdoc/task' 
#require 'tasks/rails' 

SkWeb::Application.load_tasks 
+1

能否請您在此粘貼錯誤? – Sunny

回答

0

我認爲你需要,要求文件

Dir.glob('lib/tasks/*.rake').each { |r| load r} 

您的代碼將是

# Add your own tasks in files placed in lib/tasks ending in .rake, 
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 

require File.expand_path('../config/application', __FILE__) 
require 'rake' 
Dir.glob('lib/tasks/*.rake').each { |r| load r} 
require 'rake/testtask' 
require 'rdoc/task' 
#require 'tasks/rails' 

SkWeb::Application.load_tasks 
相關問題