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)
cd
into your project directory- run
bundle exec gem uninstall capistrano -a
to remove all capistrano versions from your bundle - 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 - run
bundle install
- 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 - 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 - 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.
- Checked
/etc/nginx/nginx.conf
and make sure the value forpassenger_ruby
is the same as output ofwhich ruby
command - Check if rake version is
10.4.2
by executingrake --version
. Else purge all rake and install rake 10.4.2 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
How to Use Basic Authentication with Httparty in a Rails App
How to Organize Minitest/Unit Tests
Ruby: How to Group a Ruby Array
How to Update a Single Attribute Without Touching the Updated_At Attribute
Executing Shell Command in Background from Ruby with Proper Argument Escaping
After Installing Ruby Gems, Running the New Gem Returns "Could Not Find" Errors
Single Table Inheritance or Class Table Inheritance
Converting Date Object to Timewithzone
Check Time Between 9.30 to 4 Ruby
How to Trace and Check Dependencies in Bundled Ruby Gems
How to Configure Action Mailer (Should I Register Domain)
How to Validate a Specific Attribute on an Activerecord Without Instantiating an Object First
How to Convert Character Encoding with Ruby 1.9
How to Create a List of Months Between Two Dates in Rails