簡體   English   中英

AWS OpsWorks Ruby on Rails App Deploy-在任何來源中都找不到Rake

[英]AWS OpsWorks Ruby on Rails App Deploy - Couldn't find Rake in any of the sources

嗨,我正在使用AWS OpsWorks部署使用MySQL數據庫的Ruby on Rails應用程序。 我已經正確啟動了應用程序服務器和數據庫服務器,但是訪問應用程序服務器的IP地址會出現以下錯誤:

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

日志說:

cat /var/log/httpd/error.log

App 4689 stdout: 
App 4689 stderr: /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:92:in `block in materialize'
App 4689 stderr: : 
App 4689 stderr: Could not find rake-10.4.2 in any of the sources
App 4689 stderr:  (
App 4689 stderr: Bundler::GemNotFound
App 4689 stderr: )
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `map!'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `materialize'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/definition.rb:133:in `specs'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/definition.rb:178:in `specs_for'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/definition.rb:167:in `requested_specs'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/environment.rb:18:in `requested_specs'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:13:in `setup'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler.rb:119:in `setup'
App 4689 stderr:    from /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.5.3/lib/bundler/setup.rb:17:in `<top (required)>'
App 4689 stderr:    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
App 4689 stderr:    from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'

我已經讀到這是安裝,路徑或權限錯誤,並且已經看到其他使用rbenv卸載/重新安裝rake的解決方案,但是OpsWorks不使用rbenv。

請指教。

看來OpsWork / Agent安裝已損壞。 Rake / Bundler寶石是默認安裝的。 由於我們不知道實例/堆棧等。通常,安裝階段似乎不成功。

例如,在OpsWorks實例中:

[root @ rails-app2〜]#su-deploy上次登錄時間:UTC 2015年6月18日星期四00:39:20

[deploy @ rails-app2〜] $抽水了/ usr / local / bin / rake

[deploy @ rails-app2〜] $捆綁器/ usr / local / bin / bundler

[deploy @ rails-app2〜] $捆綁了/ usr / local / bin / bundle

[deploy @ rails-app2〜] $寶石清單

*當地的寶石*

大十進制(1.2.4)
捆扎機(1.5.3)
io控制台(0.4.3)
json(1.8.1)
公斤(2.9.3)
最小測試(4.7.5)
心理(2.0.5)
機架(1.6.2)
雨滴(0.13.0)
耙子(10.1.0)
rdoc(4.1.0)
測試單元(2.1.8.0)
獨角獸(4.7.0)
[deploy @ rails-app2〜] $注銷

[root @ rails-app2〜]#opsworks-agent-cli實例

AWS OpsWorks實例代理狀態報告:

上一次活動是在2016年1月12日18:01:12 UTC代理上進行“配置”:AWS OpsWorks代理以PID 23871代理版本運行:3431-20151222151215,最新OpsWorks堆棧:MyWebApps OpsWorks層:rails- app OpsWorks實例:rails-app2 EC2實例ID:i-bxxxx06b EC2實例類型:c3.large體系結構:x86_64總內存:3.84 Gb CPU:2x Intel(R)Xeon(R)CPU E5-2680 v2 @ 2.80GHz

位置:

EC2區域:ap-southeast-2 EC2可用區:ap-southeast-2a

聯網:

公用IP:54.xx232專用IP:10.xx73

[root @ rails-app2〜]#

  • 我建議創建新實例。

  • 另外,通常使用Rails遷移數據庫時會遇到問題。 因此,可以手動登錄實例並手動執行OpsWorks的操作,然后查看連接數據庫或其他與DB / App相關的問題是否存在問題。

例如: su deploy -c "bundle exec rake RAILS_ENV=production db:migrate"

HTH!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM