2013-12-22 55 views
3

剛剛部署了一個使用capistrano的紅寶石應用程序。我很確定我照例做了一切。乘客雖然輸出以下內容:無法加載這樣的文件 - app.rb(LoadError)

cannot load such file -- app.rb (LoadError) 
    config.ru:1:in `require' 
    config.ru:1:in `block in <main>' 
    /home/deploy/apps/blog/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval' 
    /home/deploy/apps/blog/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize' 
    config.ru:1:in `new' 
    config.ru:1:in `<main>' 
    /home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:108:in `eval' 
    /home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:108:in `preload_app' 
    /home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:153:in `<module:App>' 
    /home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>' 
    /home/deploy/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:28:in `<main>' 

**Application root** 

/home/deploy/apps/blog/current 

app.rb實際上是在這個目錄中。

+0

發表您的config.ru文件 – bjhaid

+0

'需要 'app.rb' 運行西納特拉:: Application' – user3094719

回答

7

使用下面你config.ru代替

require "./app" 
run Sinatra::Application 

這是路徑問題

+0

我試過了。沒有足夠的聲譽。非常感謝! E:哦!完成。 – user3094719

+0

我??是的,我玩過它 – bjhaid

相關問題