gpt4 book ai didi

ruby - 无法加载此类文件 -- app.rb (LoadError)

转载 作者:数据小太阳 更新时间:2023-10-29 07:48:05 26 4
gpt4 key购买 nike

刚刚使用 Capistrano 部署了一个 ruby​​ 应用程序。我很确定我像往常一样做了一切。 Passenger 虽然输出如下:

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 实际上就在这个目录下。

最佳答案

在您的 config.ru 中使用以下内容

require "./app"
run Sinatra::Application

是路径问题

关于ruby - 无法加载此类文件 -- app.rb (LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20733589/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com