0
votes
  • executing "cd -- /home/harris/harrisrobin.co/releases/20140128225905 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile" servers: ["198.199.122.209"] [198.199.122.209] executing command ** [out :: 198.199.122.209] rake aborted! ** [out :: 198.199.122.209] ** [out :: 198.199.122.209] Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. ** [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 require' ** [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 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: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 each' ** [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 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 each' ** [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 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 require' ** [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 require' ** [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] (See full trace by running task with --trace) ** [out :: 198.199.122.209] command finished in 2183ms * [deploy:update_code] rolling back * executing "rm -rf /home/harris/harrisrobin.co/releases/20140128225905; true" servers: ["198.199.122.209"] [198.199.122.209] executing command command finished in 354ms failed: "rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c 'cd -- /home/harris/harrisrobin.co/releases/20140128225905 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile'" on 198.199.122.209

Any ideas ? I have no clue what this means :

command finished in 354ms failed: "rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c 'cd --

I am following this guide and got stuck at cap deploy:cold : https://coderwall.com/p/yz8cha

1
Take a look at this question stackoverflow.com/questions/8059332/…Dhaulagiri
Hi! are you sure you've linked me to the correct question ? Unless I'm missing something, I don't see how that question can help me at all. Cheers and thanks,user2805193
Your error appears to be Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes and not the section you highlighted. That question addresses the javascript runtime error.Dhaulagiri
I've tried all the suggestions in there, but nothing has worked for me. Thank you for the link though. I'll keep looking!user2805193

1 Answers

0
votes

It seems like you're missing JavaScript runtime library. Install NodeJS on the server using this:

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

Also, for rails deployments on DO and Ubuntu in general, this is a great resource for all the steps (and a video walkthrough): https://gorails.com/deploy/ubuntu/14.04