Rails 4.1 Can't Deploy via Capistrano 3

rails 4.1 can't deploy via capistrano 3

As was written above, probably, you have not enough RAM.

I solved problem by adding SWAP file on my Ubuntu 14.04 server:

Under the root:

dd if=/dev/zero of=/swapfile bs=1024 count=512k
mkswap /swapfile
swapon /swapfile

Add next line to /etc/fstab:

 /swapfile       none    swap    sw      0       0 

and:

echo 0 > /proc/sys/vm/swappiness
sudo chown root:root /swapfile
sudo chmod 0600 /swapfile

check SWAP(maybe need reloading):

swapon -s 

— How To Add Swap on Ubuntu 14.04 @ Digital Ocean Community

Capistrano version conflict

Please follow all the steps in the right order (don't skip any because you did it)

  1. cd into your project directory
  2. run bundle exec gem uninstall capistrano -a to remove all capistrano versions from your bundle
  3. run gem uninstall capistrano -a to remove all capistrano versions from your system. Note that you may need to run this with root access if you get an error message
  4. run bundle install
  5. run bundle exec gem list capistrano which should output all installed gems with a name that contains "capistrano". You are supposed to have only one version of the capistrano gem
  6. check in your files config/deploy.rb and config/deploy/*.rb if you have a lock 3.x.x instruction, and make sure it matches the install version as show in step 5
  7. run cap in bundle context with bundle exec cap production deploy (use exactly this command line, do not use bin/cap)

How can i solve Capistrano command error, cap production deploy?

I had same error but with:

capistrano/rbenv

I commit the line (in your case 23) in Gapfile and the deploy work with no problems.

Capistrano Rails deploy Passenger error

Well, I did the following three steps and it started working. These are from the comments of Зелёный. Seems like I had to restart the machine or something for the changes to reflect. I am not sure.

  1. Checked /etc/nginx/nginx.conf and make sure the value for passenger_ruby is the same as output of which ruby command
  2. Check if rake version is 10.4.2 by executing rake --version. Else purge all rake and install rake 10.4.2
  3. bundle install

After doing these, I restarted the machine and did cap prelive deploy and the application was up.

Capistrano 3 fails on assets:precompile

I solved the problem, it wasn't related to capistrano or even rvm.
I use two layouts for my app: front.html.slim and admin.html.slim, each with a dedicated stylesheet: front.css and admin.css.

In front.css.scss I was using the following (sass) syntax:

@import "compass";
@import "compass/utilities/sprites";

While admin.css.scss used Sprocket's syntax:

/*
*= require base
*= require posts
*= require projects

The assets:precompile task finished successfully after I changed admin.css.scss to actual sass syntax:

 @import "base";
@import "posts";
@import "projects";

Thanx @RAJ for your advice.



Related Topics



Leave a reply



Submit