Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot load such file -- app.rb (LoadError)

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.

like image 462
user3094719 Avatar asked Mar 22 '23 05:03

user3094719


1 Answers

Use the below in your config.ru instead

require "./app"
run Sinatra::Application

It is path issues

like image 66
bjhaid Avatar answered Apr 02 '23 00:04

bjhaid