Reputation: 297
Just deployed a ruby app using capistrano. I'm pretty sure I did everything as usual. Passenger though outputs the following:
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
The app.rb actually is in this directory.
Upvotes: 4
Views: 3868
Reputation: 9752
Use the below in your config.ru
instead
require "./app"
run Sinatra::Application
It is path issues
Upvotes: 7