我正在使用rails 3.1.0並試圖設置Capistrano來預編譯資產。 Capistrano v2.8.0在Capfile中「加載」部署/資產「」。但是,當我運行「帽部署」它顯示了以下錯誤:Capistrano預編譯資產顯示加載「部署/資產」錯誤
cap deploy
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:183:in `find_file_in_load_path': no such file to load -- deploy/assets (LoadError)
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:171:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from Capfile:3:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `each'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:30:in `execute!'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:14:in `execute'
from /usr/bin/cap:4
UPDATE
奇蹟般地開始工作後,我重新啓動我的電腦(Ubuntu的)。
謝謝,我不知道這個「bundle exec」選項。 – Evgenii
這是bundler的要求,否則你使用全系統安裝的Cap,當使用'bundle exec'時它會加載你的gemfile中指定的那個。另一種方法是使用bundle'--binstubs'選項,並相應地修改'$ PATH',參見這裏獲取更多信息:http://blog.davidchelimsky.net/2011/07/18/stop-typing-bundle -exec/ –