尝试使用capistrano部署到DO。上限部署时遇到错误:冷

时间:2014-01-28 23:41:37

标签: ruby-on-rails digital-ocean

  
      
  • 执行“cd -   /home/harris/harrisrobin.co/releases/20140128225905& amp ;& amp;   RAILS_ENV =生产RAILS_GROUPS =资产捆绑执行耙   资产:预编译”   服务器:[“198.199.122.209”]   [198.199.122.209]执行命令** [out :: 198.199.122.209] rake aborted! ** [out :: 198.199.122.209] ** [out ::   198.199.122.209]无法找到JavaScript运行时。有关可用列表,请参阅https://github.com/sstephenson/execjs   运行时间。 ** [out :: 198.199.122.209] ** [out :: 198.199.122.209]   /home/harris/harrisrobin.co/shared/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in   autodetect' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/harrisrobin.co/shared/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs.rb:5:in '** [out :: 198.199.122.209] ** [out ::   198.199.122.209] /home/harris/harrisrobin.co/shared/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs.rb:4:in   <top (required)>' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/harrisrobin.co/shared/bundle/ruby/2.0.0/gems/uglifier-2.4.0/lib/uglifier.rb:3:in 要求'** [out :: 198.199.122.209] ** [out :: 198.199.122.209]   /home/harris/harrisrobin.co/shared/bundle/ruby/2.0.0/gems/uglifier-2.4.0/lib/uglifier.rb:3:in   <top (required)>' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in 要求'** [out :: 198.199.122.209] ** [out :: 198.199.122.209]   /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in   block (2 levels) in require' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in 每个'** [出:: 198.199.122.209] ** [出:: 198.199.122.209]   /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in   block in require' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in 每个'** [出:: 198.199.122.209] ** [出:: 198.199.122.209]   /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in   require' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.5.2/lib/bundler.rb:131:in 要求'** [out :: 198.199.122.209] ** [out :: 198.199.122.209]   /home/harris/harrisrobin.co/releases/20140128225905/config/application.rb:7:in   <top (required)>' ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] /home/harris/harrisrobin.co/releases/20140128225905/Rakefile:4:in 要求'** [out :: 198.199.122.209] ** [out :: 198.199.122.209]   /home/harris/harrisrobin.co/releases/20140128225905/Rakefile:4:in   `'** [out :: 198.199.122.209] ** [out ::   198.199.122.209](通过使用--trace运行任务查看完整跟踪)** [out :: 198.199.122.209]   命令在2183ms完成    * [deploy:update_code]回滚*执行“rm -rf /home/harris/harrisrobin.co/releases/20140128225905; true”   服务器:[“198.199.122.209”]   [198.199.122.209]执行命令   命令在354ms内完成失败:“rvm_path = $ HOME / .rvm $ HOME / .rvm / bin / rvm-shell'default'-c'cd -   /home/harris/harrisrobin.co/releases/20140128225905& amp ;& amp;   RAILS_ENV =生产RAILS_GROUPS =资产捆绑执行耙   assets:precompile'“on 198.199.122.209
  •   

有什么想法吗?我不知道这意味着什么:

  

命令在354ms内完成失败:“rvm_path = $ HOME / .rvm   $ HOME / .rvm / bin / rvm-shell'default'-c'cd -

我正在遵循本指南并陷入上限部署:冷: https://coderwall.com/p/yz8cha

1 个答案:

答案 0 :(得分:0)

您好像缺少JavaScript运行时库。使用以下命令在服务器上安装NodeJS:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

此外,对于DO和Ubuntu上的rails部署,这是所有步骤(以及视频演练)的绝佳资源: https://gorails.com/deploy/ubuntu/14.04