I just reinstalled my staging server and I can't deploy my code. I installed pgsql and libpq-dev on the Ubuntu server 16.04 that I use. The file /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg_ext.so do exist.
Here is the error I encounter :
executing "cd -- /srv/outils/www/projectname/releases/20171119230417 && RAILS_ENV=prodtest RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["**.**.**.**"]
[**.**.**.**] executing command
** [out :: **.**.**.**] rake aborted!
** [out :: **.**.**.**]
** [out :: **.**.**.**] LoadError: libruby.so.2.3: cannot open shared object file: No such file or directory - /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg_ext.so
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:4:in `require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:4:in `<top (required)>'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `each'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:76:in `block in require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `each'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/runtime.rb:65:in `require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /var/lib/gems/2.3.0/gems/bundler-1.16.0/lib/bundler.rb:114:in `require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/config/application.rb:11:in `<top (required)>'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/Rakefile:6:in `require'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/releases/20171119230417/Rakefile:6:in `<top (required)>'
** [out :: **.**.**.**]
** [out :: **.**.**.**] /srv/outils/www/projectname/shared/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
** [out :: **.**.**.**]
** [out :: **.**.**.**] (See full trace by running task with --trace)
** [out :: **.**.**.**]
command finished in 2861ms
*** [deploy:update_code] rolling back
I checked all I could think of. It's the same error if I do manually the capistrano commands in the server.
I was fixated on pg_est.so, but what I was missing was libruby.so.2.3
I uninstalled my ruby and reinstalled it, and now this step works.
I really want to deploy an app and had been following railstutorial by Michael Hartl. Now, I'm about to deploy my first app in Digital Ocean but I keep on running on to a lot of problems. Anyway, most of it was already done except on this big one.
I followed the this blog by Hoang Pham and a tutorial by [Andrew Gertig][3].
Anyways, this is my first entry here. Let me say my thanks in advance.Everytime I do, $ cap deploy:cold, on my local machine I always get this error.
failed: "rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c
'cd /home/deployer/apps/tiangge/releases/20150123165947 && bundle
install --gemfile
/home/deployer/apps/tiangge/releases/20150123165947/Gemfile --path
/home/deployer/apps/tiangge/shared/bundle --deployment --quiet
--without development test'" on 128.199.74.8
And I also notice this one, that's why I did gem uninstall bundler and gem install bundler again in the VPS
[128.199.74.8] executing command ** [out :: 128.199.74.8] Unfortunately, a fatal error has occurred. Please see the Bundler **
[out :: 128.199.74.8] ** [out :: 128.199.74.8] troubleshooting
complete log:
triggering load callbacks
* 2015-01-23 20:59:18 executing `deploy:cold'
* 2015-01-23 20:59:18 executing `deploy:update'
** transaction: start
* 2015-01-23 20:59:18 executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
* 2015-01-23 20:59:18 executing `sidekiq:quiet'
* executing "if [ -d /home/deployer/apps/tiangge/current ] && [ -f /home/deployer/apps/tiangge/shared/pids/sidekiq.pid ] && kill -0 `cat /home/deployer/apps/tiangge/shared/pids/sidekiq.pid`> /dev/null 2>&1; then cd /home/deployer/apps/tiangge/current && bundle exec sidekiqctl quiet /home/deployer/apps/tiangge/shared/pids/sidekiq.pid ; else echo 'Sidekiq is not running'; fi"
servers: ["128.199.74.8"]
deployer#128.199.74.8's password:
[128.199.74.8] executing command
** [out :: 128.199.74.8] Sidekiq is not running
** [out :: 128.199.74.8]
command finished in 1328ms
updating the cached checkout on all servers
executing locally: "git ls-remote git#bitbucket.org:bryanbenjamin/tiangge.git master"
command finished in 4069ms
* executing "if [ -d /home/deployer/apps/tiangge/shared/cached-copy ]; then cd /home/deployer/apps/tiangge/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard d87bdfba0860752edddcf6e8c021c1468367aa03 && git clean -q -d -x -f; else git clone -q -b master git#bitbucket.org:bryanbenjamin/tiangge.git /home/deployer/apps/tiangge/shared/cached-copy && cd /home/deployer/apps/tiangge/shared/cached-copy && git checkout -q -b deploy d87bdfba0860752edddcf6e8c021c1468367aa03; fi"
servers: ["128.199.74.8"]
[128.199.74.8] executing command
command finished in 10461ms
copying the cached version to /home/deployer/apps/tiangge/releases/20150123165947
* executing "cp -RPp /home/deployer/apps/tiangge/shared/cached-copy /home/deployer/apps/tiangge/releases/20150123165947 && (echo d87bdfba0860752edddcf6e8c021c1468367aa03 > /home/deployer/apps/tiangge/releases/20150123165947/REVISION)"
servers: ["128.199.74.8"]
[128.199.74.8] executing command
command finished in 1416ms
* 2015-01-23 20:59:49 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2015-01-23 20:59:49 executing `deploy:assets:symlink'
* executing "rm -rf /home/deployer/apps/tiangge/releases/20150123165947/public/assets && mkdir -p /home/deployer/apps/tiangge/releases/20150123165947/public && mkdir -p /home/deployer/apps/tiangge/shared/assets && ln -s /home/deployer/apps/tiangge/shared/assets /home/deployer/apps/tiangge/releases/20150123165947/public/assets"
servers: ["128.199.74.8"]
[128.199.74.8] executing command
command finished in 1290ms
* 2015-01-23 20:59:50 executing `bundle:install'
* executing "cd /home/deployer/apps/tiangge/releases/20150123165947 && bundle install --gemfile /home/deployer/apps/tiangge/releases/20150123165947/Gemfile --path /home/deployer/apps/tiangge/shared/bundle --deployment --quiet --without development test"
servers: ["128.199.74.8"]
[128.199.74.8] executing command
** [out :: 128.199.74.8] Unfortunately, a fatal error has occurred. Please see the Bundler
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:114:in ``'
** [out :: 128.199.74.8] :
** [out :: 128.199.74.8] Cannot allocate memory - git clone 'git://github.com/spree/spree_auth_devise.git' "/home/deployer/apps/tiangge/shared/bundle/ruby/2.1.0/cache/bundler/git/spree_auth_devise-68351354588ecb7fa5d7bc278ebd86436a50d33d" --bare --no-hardlinks --quiet
** [out :: 128.199.74.8] (
** [out :: 128.199.74.8] Errno::ENOMEM
** [out :: 128.199.74.8] )
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:114:in `block in git'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/shared_helpers.rb:62:in `call'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/shared_helpers.rb:62:in `with_clean_git_env'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:114:in `git'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:108:in `block in git_retry'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/retry.rb:38:in `call'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/retry.rb:38:in `run'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/retry.rb:28:in `attempt'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:107:in `git_retry'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git/git_proxy.rb:73:in `checkout'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/source/git.rb:149:in `specs'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/lazy_specification.rb:53:in `__materialize__'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/spec_set.rb:88:in `block in materialize'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/spec_set.rb:85:in `map!'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/spec_set.rb:85:in `materialize'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/definition.rb:132:in `specs'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/definition.rb:121:in `resolve_remotely!'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/installer.rb:79:in `run'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/installer.rb:18:in `install'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/cli/install.rb:79:in `run'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/cli.rb:145:in `install'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/vendor/thor/command.rb:27:in `run'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/vendor/thor.rb:363:in `dispatch'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/vendor/thor/base.rb:440:in `start'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/cli.rb:9:in `start'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/bin/bundle:20:in `block in <top (required)>'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/gems/bundler-1.7.12/bin/bundle:18:in `<top (required)>'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/bin/bundle:23:in `load'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/bin/bundle:23:in `<main>'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
** [out :: 128.199.74.8]
** [out :: 128.199.74.8]
** [out :: 128.199.74.8] from /home/deployer/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
** [out :: 128.199.74.8]
command finished in 56236ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deployer/apps/tiangge/releases/20150123165947; true"
servers: ["128.199.74.8"]
[128.199.74.8] executing command
command finished in 1335ms
failed: "rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c 'cd /home/deployer/apps/tiangge/releases/20150123165947 && bundle install --gemfile /home/deployer/apps/tiangge/releases/20150123165947/Gemfile --path /home/deployer/apps/tiangge/shared/bundle --deployment --quiet --without development test'" on 128.199.74.8
deploy.rb
require "bundler/capistrano"
require "rvm/capistrano"
require 'capistrano/sidekiq'
server "128.199.74.8", :web, :app, :db, primary: true
set :application, "tiangge"
set :user, "deployer"
set :port, 6000
set :deploy_to, "/home/#{user}/apps/#{application}"
set :deploy_via, :remote_cache
set :use_sudo, false
set :scm, "git"
set :repository, "git#bitbucket.org:bryanbenjamin/tiangge.git"
set :branch, "master"
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
after "deploy", "deploy:cleanup" # keep only the last 5 releases
namespace :deploy do
%w[start stop restart].each do |command|
desc "#{command} unicorn server"
task command, roles: :app, except: {no_release: true} do
run "/etc/init.d/unicorn_#{application} #{command}"
end
end
task :setup_config, roles: :app do
sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}"
sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}"
run "mkdir -p #{shared_path}/config"
put File.read("config/database.example.yml"), "#{shared_path}/config/database.yml"
puts "Now edit #{shared_path}/config/database.yml and add your username and password"
end
after "deploy:setup", "deploy:setup_config"
task :symlink_config, roles: :app do
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
end
after "deploy:finalize_update", "deploy:symlink_config"
desc "Make sure local git is in sync with remote."
task :check_revision, roles: :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
puts "WARNING: HEAD is not the same as origin/master"
puts "Run `git push` to sync changes."
exit
end
end
before "deploy", "deploy:check_revision"
end
Steps that I've done:
-reinstalled bundler and
-tried set :rvm_bin_path, "/usr/share/ruby-rvm/bin" in deploy.rb
and some few things
Gemfile:
source 'https://rubygems.org'
ruby '2.1.3'
gem 'rails', '4.1.8'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'unicorn'
gem 'capistrano'
gem 'rvm-capistrano'
gem 'dotenv-rails'
gem 'capistrano-sidekiq'
gem 'spree', '2.4.2'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '2-4-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-4-stable'
You've got a Cannot allocate memory error. That means not enough RAM for bundler on your deploying machine.
You can add swap partition to do this, or create a DO droplet with bigger RAM space.
Good tutorial about adding a swap to DO droplet https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04
I had a similar problem trying to deploy Dokku on Digital Ocean / Ubuntu.
Easy fix with 3 lines of code run inside SSH session in the root digital ocean user:
dd if=/dev/zero of=/swapfile bs=1024 count=1024000
mkswap /swapfile
swapon /swapfile
For reference see: http://dev.housetrip.com/2014/07/06/deploy-rails-and-postgresql-app-to-dokku/
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
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
what it means, when i deploy my project i have error :
** transaction: commit
* 2014-01-10 15:52:54 executing `deploy:bundle'
* executing "cd /var/www/current; bundle install"
servers: ["10.3.27.72"]
[10.3.27.72] executing command
** [out :: 10.3.27.72] /home/shibanov/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 0 total gem(s) (
** [out :: 10.3.27.72] Gem::LoadError)
** [out :: 10.3.27.72] from /home/shibanov/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
** [out :: 10.3.27.72] from /home/shibanov/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
** [out :: 10.3.27.72] from /home/shibanov/.rvm/gems/ruby-2.0.0-p195#sprut/bin/bundle:22:in `<main>'
** [out :: 10.3.27.72] from /home/shibanov/.rvm/gems/ruby-2.0.0-p195#sprut/bin/ruby_executable_hooks:15:in `eval'
** [out :: 10.3.27.72] from /home/shibanov/.rvm/gems/ruby-2.0.0-p195#sprut/bin/ruby_executable_hooks:15:in `<main>'
command finished in 41ms
failed: "env PATH=/home/shibanov/.rvm/gems/ruby-2.0.0-p195#sprut/bin:/home/shibanov/.rvm/gems/ruby-2.0.0-p195#sprut/bin:/home/shibanov/.rvm/rubies/ruby-2.0.0-p195/bin:/home/shibanov/.rvm/bin:$PATH RUBY_VERSION=ruby-2.0.0-p195 GEM_HOME=/home/shibanov/.rvm/gems/uby-2.0.0-p195#sprut GEM_PATH=/home/shibanov/.rvm/gems/uby-2.0.0-p195#sprut:/home/shibanov/.rvm/gems/uby-2.0.0-p195#sprut BUNDLE_PATH=/home/shibanov/.rvm/gems/uby-2.0.0-p195#sprut sh -c 'cd /var/www/current; bundle install'" on 10.3.27.72
it error happen when i migrate project from ruby 1.9.3 to ruby 2.0
You have to set GEM_HOME accordingly:
$ export GEM_HOME='/home/shibanov/.rvm/gems/ruby-2.0.0-p195'
I'm getting a cryptic error on cap deploy
$ cap deploy
. . .
* executing "cd -- /rails/myapp/releases/20130919002235 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["persephone"]
[persephone] executing command
. . .
** [out :: persephone] rake aborted!
** [out :: persephone] Caught Encoding::CompatibilityError at '["ok","(function() {': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
** [out :: persephone] (in /rails/myapp/releases/20130919002235/app/assets/javascripts/disk_files.js.coffee)
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:242:in `rescue in parse_string'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:213:in `parse_string'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:257:in `parse_value'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:121:in `parse'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:155:in `parse'
. . .
In trying to debug the problem I've tried completely removing disk_files.js.coffee and then the same error occurs for application.js.
I've then changed my application.js manifest so that it doesn't require anything and then I get a similar error for application.css
I've commented out my custom css and now I get:
** [out :: persephone] rake aborted!
** [out :: persephone] undefined method `[]' for nil:NilClass
** [out :: persephone] (in /rails/myapp/releases/20130919200133/app/assets/stylesheets/application.css)
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/sass_functions.rb:63:in `sprockets_context'
Each of these steps requires a git commit to origin and then a cap deploy.
FWIW- adding #encoding: UTF-8 as per SO#9857443 doesn't help.
Anyone know what's going on? How can I debug this?