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

时间:2018-12-11 21:41:30

标签: ruby-on-rails ruby

我试图从崩溃的服务器中启动一个旧的Ruby on Rails应用程序,当我尝试通过浏览器访问它时,出现以下屏幕: enter image description here

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

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如何运行事情,但是我知道大多数语言都有搜索“路径”的概念,并且我假设我只需要在某个地方设置路径即可。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我最终手动复制了 / data / srv / ---已编辑--- / shared / bundle / ruby​​ / 1.8 / gems / activerecord-3.0.20 / lib / active_record / locking / optimistic.rb

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

由于某些原因,运行捆绑安装没有任何改变。