繁体   English   中英

Ruby on Rails应用程序-没有要加载的文件

[英]Ruby on Rails application - No such file to load

我试图从崩溃的服务器中启动一个旧的Ruby on Rails应用程序,当我尝试通过浏览器访问它时,出现以下屏幕: 在此处输入图片说明

对于复制和粘贴/可搜索性,以下为文本:

Ruby on Rails application could not be loaded
---------------------------------------------
A source file that the application requires, is missing.

    It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
    A required library may not installed. Please install all libraries that this application requires.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
    no such file to load -- active_record/locking/optimistic
Exception class:
    LoadError
Application root:
    /srv/---REDACTED---/current 
Backtrace:
---the backtrace---

回溯中提到的第一行是:

include Locking::Optimistic, Locking::Pessimistic

因此,它正在寻找active_record / locking / optimistic,我在其他许多地方都找到了它:

/data/srv/---REDACTED---/shared/bundle/ruby/1.8/gems/activerecord-3.0.20/lib/active_record/locking/optimistic.rb
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.20/lib/active_record/locking/optimistic.rb
/var/lib/gems/1.8/gems/activerecord-3.0.20/lib/active_record/locking/optimistic.rb

我的问题是我不知道如何告诉Ruby去哪里寻找它认为丢失的文件。 我不是Ruby的人,也不知道Phusion Passenger是如何运行的,但是我知道大多数语言都有搜索“路径”的概念,我假设我只需要在某个地方设置路径即可。

有任何想法吗?

我最终从/data/srv/---REDACTED---/shared/bundle/ruby/1.8/gems/activerecord-3.0.20/lib/active_record/locking/optimistic.rb中手动复制了丢失的文件

...到报告丢失文件的宝石,因为它似乎是相同的宝石和相同的版本。

由于某些原因,运行捆绑软件安装并没有做任何更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM