簡體   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