Menu
  • HOME
  • TAGS

bundle install fails because “No such file or directory”

ruby-on-rails,gem,capistrano,bundler

solved by reinstalling bundler and rvm

chef rails 4 ruby 2.1 rbenv capistrano shared bin passenger file missing

ruby-on-rails,ruby,capistrano,passenger,chef

I'm assuming passenger isn't in the Gemfile which is would cause the binstub to not get created. Is that the issue?

installing ruby on EC2 Amazon Unix, using capistrano

ruby,amazon-ec2,rvm,capistrano

So, this is my solution without rmv. Please let me know, if you have any improvements, thoughts or critics: namespace :deploy do RUBY_VERSION = 'ruby-1.9.3-p545' task :step do # remove default ruby and install dependencies run "#{sudo} yum erase --assumeyes ruby" run "#{sudo} yum install --assumeyes readline-devel openssl-devel libyaml-devel" #...

Capistrano and Corkscrew PATH error

ruby-on-rails,git,ssh,capistrano,gitlab

The problem seems to be that ssh can't find the corkscrew executable. I double-checked my local ~/.ssh/config file, and I use the full path to the corkscrew executable in there: Host * ProxyCommand /usr/local/bin/corkscrew <server> 8088 %h %p ~/.ssh/proxyauth (Since I'm on OS X and have installed corkscrew through Homebrew,...

Get path to capistrano shared path from ruby

ruby,ruby-on-rails-4,capistrano,capistrano3

You really shouldn't need to know what Capistrano's shared path is. During the deployment process it's expected that you'll create links to any directories that are shared between deployments. The linked_dirs variable defines this: set :linked_dirs, %w[ example ] If set, during deployment releases/NNN/example will be linked to shared/example. You...

Unicorn / Capistrano, Post deploy Unicorn workers on new PID, app not refreshing

ruby-on-rails,capistrano,unicorn

What signal does this /etc/init.d/unicorn_salescrm_production use for restart?. For example, if you set preload = true, you should use USR2 instead of HUP for restart. http://unicorn.bogomips.org/SIGNALS.html

Capistrano “No tty present and no askpass program specified”

ruby-on-rails,postgresql,ubuntu,capistrano

One solution would be to allow the sudo command on your server without entering a password, but that could be a security risk. Alternatively, you can fix your Capistrano configuration because something is likely wrong. It would help if you showed us the contents of your deploy.rb file but first...

Issue with running bundle using Capistrano

ruby-on-rails,ruby-on-rails-4,capistrano,unicorn

Look at output of Capistrano carefully. Such commands as bundle assets:precompile makes initialization of required ruby version: cd /<app path>/20150301211440 && ( RAILS_ENV=staging /usr/local/rvm/bin/rvm 2.1.5 do bundle exec rake assets:precompile ) Seems like you don't do it. So, probably you a using system ruby by default and it doesn't have...

Why can't bundle find gems in production after `bundle --deployment`?

ruby-on-rails,capistrano,bundler,capistrano3,rubinius

With help from brixen and yorickpeterse on #rubinius, we discovered that the root cause of this chaos was psych above 2.0.8. #with rbx 2.4.1 and psych 2.0.8 rbx-2.4.1 :003 > YAML.dump({fu: 'bar'}) => "---\n:fu: bar\n" but the problem comes when you update versions: rbx-2.4.1 :005 > YAML.dump({fu: 'bar'}) => "---...

the deploying with capistrano and uploads directory with ruby on rails

ruby-on-rails,capistrano

You want to make sure you set :linked_dirs in your deploy.rb e.g. for one of my sites paperclip uploads to the public/system directory so I need to make sure I symlink that one: set :linked_dirs, ['log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system'] EDIT: For me this creates a symlink in [cap...

Rails application does not get restarted automatically after deployment through Capistrano 3.x

ruby-on-rails-4,capistrano

by using capistrano, you can run whatever you want on the server task :execute_on_server do on "[email protected]" do execute "some_command" end end other than that, you usually put a .keep file in a directory that is necessary but that you do not want to track otherwise. so when you checkout...

Capistrano task git clone private gem

ruby-on-rails,git,capistrano

The issue was my execute statement: execute 'git clone [email protected]:username/my_gem.git', gem_path I changed it to execute "git clone [email protected]:username/my_gem.git #{gem_path}" and it is working as expected now....

Capistrano Symfony Deploy Failed

php,symfony2,capistrano,composer-php

I find the problem, Problem : Normally Capistrano composer sets the SYMFONY_ENV as 'prod' but it doesn't exports the var, therefore symfony trying to call development bundles but also when composer install instruction works there is --no-dev option using with command, and it is causing the problem. In vendor/ there...

Capistrano deployment problems

ruby-on-rails,deployment,capistrano

It occurs that config/deploy.rb has lock '3.1.0'. It was enough to change it to '3.2.0' and now it's working....

Why I'm getting “undefined local variable or method `rails_env'”?

ruby-on-rails,solr,capistrano,capistrano3

You should use fetch method. So, instead of rails_env use: fetch(:rails_env) Here (or here) is more details....

uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable (NameError) - in Spree shop

ruby-on-rails,deployment,capistrano,activemerchant

This is the same issue detailed at https://github.com/Shopify/active_utils/issues/57 . The fix for the issue was included into active_merchant gem on Jan 15th, 2015 and is available in activemerchant versions 1.47.0 or higher. So to fix the issue on your rails app, update the activemerchant gem version. The steps would be...

how to deploy in debug mode a symfony2 app with capifony?

php,symfony2,deployment,capistrano,capifony

The problem is that composer has a section require-dev that is not gathered or added to the autoloader. You can configure capifony to include the require-dev, prefrabily in you development.rb: set :composer_options, "--dev --verbose --prefer-dist --optimize-autoloader --no-progress" In conjuntion with set :clear_controllers, false you should be able to run app_dev.php...

cap command not found [Cygwin + Capistrano]

ruby-on-rails,gem,rubygems,cygwin,capistrano

I created a cap file in /usr/local/bin/ and made it executable. $ cat /usr/local/bin/cap #!/bin/bash ruby ~/.gem/ruby/gems/capistrano-3.3.5/bin/cap "[email protected]" Location of capistrano gem files can be found using gem which capistrano. I personally do not know if this is the best way of doing it, but I've just set it up...

Capistrano destination path already exists, not an empty directory

ruby-on-rails,capistrano,capistrano3

I had the same problem. The reason is in double definition of the role and/or server. Try to remove server 'SERVER-IP', user: 'USERNAME', roles: %w{app} in production.rb and role :app, "SERVER-IP" in deploy.rb. The latter seems to be just simple syntax while the former - is extended one, so you...

capistrano cannot run ssh: no such file or directory

deployment,ssh,capistrano

Your log seems to suggest that either there is no ssh client installed in your deployment server, or the command cannot be found in the server's PATH. Try if cloning the repo via https instead of ssh will work, by changing the following: BEFORE set :repository, "[email protected]:hstandaert/test.git" AFTER set :repository,...

Permission Denied (publickey) during cap deploy ever since I moved to bitbucket

ruby-on-rails,git,ssh,capistrano,bitbucket

It seems that the var/www/mysite/repo folder on my server had some git references to my old repo (the non bitbucket one) so I just removed that folder. Voila!

Rails 3.2 - `bundle install` fails due to Gemnasium error after Ruby reinstall

ruby-on-rails,ruby,gem,capistrano,bundler

Appears your gemnasium gem is deprecated ( and not showing in rubygems.org, you should trying installing it directly from source on github. Add the following line to your Gemfile and run bundle install gem 'gemnasium', :git => 'git://github.com/gemnasium/gemnasium-gem.git' ...

Rails deploying Gemfile.lock to development and production repositories

ruby-on-rails,capistrano,bundler

This answer solved my problem. I created a file called .rails-env which contains a simple string specifying the environment bundler should use. This file must be kept out of the repository. If not present, bundler defaults to development. The second part of the problem was that I had to adjust...

Capistrano deploy fails with sudden permission problems

git,symfony2,doctrine2,capistrano,capifony

I discovered the issue. I hadn't run composer update, and a new version of one bundle was released. It had many altered parameters causing an error. It was a strange place to get an error in the deployment sequence. Moral of the story: Run 'composer update' on your dev box...

Capistrano deploy on windows fails with git

ruby-on-rails,git,bash,capistrano

So your problem was actually deployment server git permissions. Deployment server wasn't able to get into repository because it's public key was added as a personal key to one of accounts which had access to repository before but which access was recently revoked, so deployment server access was revoked too....

cap deployment is failing with “LoadError: cannot load such file — sidekiq/capistrano”

ruby-on-rails-4,capistrano,sidekiq,capistrano3,ruby-on-rails-4.1

With "bundle update", sidekiq gem also get updated to 3.0.0 In sidekiq 3.0.0, capistrano integrated support has been removed. Instead we can use capistrano-sidekiq gem. Add gem into Gemfile and do bundle install gem "capistrano-sidekiq" and replace "require 'sidekiq/capistrano'" in Capfile with require 'capistrano/sidekiq' ...

capistrano deployment to a server without public IP through a proxy

proxy,capistrano,web-deployment

Capistrano communicates to the target server over SSH - if you setup the SSH connection to proxy through your 'bastion' server and land on the appropriate final host(s), then Capistrano - over that connection - will do the same. One of the easiest ways of setting this up, is with...

Capistrano 3.1 compile_assets_locally

ruby-on-rails,capistrano

The error message says that you did not define 'compile_assets_locally' task. It seems you are including capistrano-rails gem already, so I think second method can fix your issue easily First method: Define compile_assets_locally task. Copy template and place it under lib/capistrano/tasks directory (make sure the extension is .cap). Second method:...

Capistrano Rails deploy with new migration files

ruby-on-rails,ruby-on-rails-4,deployment,capistrano

You can override cap db:migrations in config/deploy.rb by adding namespace :deploy do desc "No ActiveRecord override" task :migrate do end end This way when you deploy it won't run the migrations, then you can go to the server and run rake tasks for dropping and resetting the database. Note: It...

pg gem install fails, cannot find libpq-fe.h header

centos,capistrano,bundler,pg,centos7

The postgres binaries are not in the path. Symlink them in to a directory in your path and you should be good: ln -s /usr/pgsql-9.4/bin/p* /usr/local/bin. Did you build postgres or install it from yum?...

InvalidByteSequenceError deploying Volt via Intercity

css,deployment,capistrano,assets,voltrb

This has to do with the encoding. To fix, put these lines at the top of your Gemfile. Encoding.default_external = Encoding::UTF_8 Encoding.default_internal = Encoding::UTF_8 See the article here for a discussion....

Deploying Rails App with Capistrano - “ERROR: Repository not found.”

ruby-on-rails,capistrano,capistrano3

I had to change my /config/deploy.rb file in order for Capistrano to actually use the work_rsa private key : set :ssh_options, { forward_agent: false, paranoid: true, keys: "~/.ssh/work_rsa" } ...

Gemfile not found when running Cron job with Capistrano 3 and whenever gem

ruby-on-rails,capistrano,bundler,whenever

Basically the environment variable is missing that tells the cron where to look for a Gemfile. so you need to add that variable in your environment at the time when cron tries to run this. You can do that in Your schedule.rb: env BUNDLE_GEMFILE, ENV["/home/hey_production/current/Gemfile"] or directly inside crontab file...

Running capistrano v2 and v3 on different apps on the same machine

ruby-on-rails,capistrano

Try prefixing with bundle exec, i.e. bundle exec cap deploy ...

Executing WP-CLI via SSH and Capistrano

wordpress,ssh,capistrano

SSH into your server and run which wp or find /home/yourusername/ -name 'wp' to find out where wp-cli is located. Let's say wp-cli is located under your home path in bin folder, then you would add run "cd #{release_path} && /home/yourusername/bin/wp --version". I hope this helps....

running rails console in Capistrano deployed app

ruby-on-rails,capistrano

rails c is probably failing due to the fact that you are missing bin/rails in your deployed app. See this answer for a fix: Rails 4 doesn't detect application after capistrano deployment Once you get bin/rails working, you can run a command without using the console like this: bundle exec...

Rails 4 doesn't detect application after capistrano deployment

ruby-on-rails,capistrano

I think the problem is that you are missing bin/rails in the deployed copy of your Rails app. Here's what I would do: Make sure the contents of your bin directory are added, committed, and pushed to your git repository. This will include bin/rails and bin/rake. Remove bin from Capistrano's...

Capistrano unable to pull a Stash repository using SSH

git,ssh,capistrano,capistrano3,atlassian-stash

A simplistic answer, but I would guess that Capistrano is picking up the wrong key. I'd suggest that you check the default ssh key for the deployment user. So, if capistrano is set to log into the server using deployuser, see what key deployuser picks up. It can be helpful...

Capistrano current application path

ruby-on-rails,capistrano

Solved using the current working directory Dir.pwd

Capistrano rollback broken Syntax error: end of file unexpected (expecting “)”)

ruby-on-rails,deployment,capistrano

The problem was I had the following in my deploy.rb namespace :rake I changed this to namespace :raketask ...

Error when running a script

wordpress,git,unix,ssh,capistrano

I am not sure how the script is generated but there seems to be some unnecessary escapes. I cleaned it and the following works for me: export GIT_RECURSIVE=$([ ! "`git --version`" \< "git version 1.6.5" ] && echo --recursive) && ...

What is <<-CMD in the Capistrano source?

ruby-on-rails,ruby,capistrano

This syntax is called a heredoc or here document (because it's included 'right here') and is indeed a way to write long, multi-line strings without quotes. It's not specific to Capistrano, but part of Ruby (and many other languages too, going as far back as old UNIX shells.) The Ruby...

Why getting empty CSS files in Production?

ruby-on-rails,nginx,capistrano

Get rid of the file extensions in your @import declarations. It should be: @import "jquery-ui"; @import "admin/jquery.datepick"; ...

'minitest' gem not found during production bundle install

ruby-on-rails,capistrano

Login to the server by ubuntu user and run gem update bundler and after cap deploy from local machine.

capistrano adresses wrong server

ruby-on-rails,ruby,capistrano

Your default stage is set to staging, take a look in config/deploy/staging.rb.

capistrano throwing devise secret_key not set

ruby-on-rails,devise,capistrano,rvm-capistrano

it turned out that my figaro tasks was not executed before the assets:precompile. ive changed my event to before :updated to fix the issue. here are the example of a working figaro in config/deploy.rb cap production deploy --trace # will be useful for debuggging more on capistrano flow namespace :figaro...

Rails 3.2: Why does my master branch see the capistrano-stats gem from my rails4 upgrade branch and can I deploy master?

ruby-on-rails,ruby,git,gem,capistrano

If you are deploying master, but you have checked out the rails4 branch in local git, you are still deploying using your local config (from the rails4 branch). This is due to the fact, that capistrano does not checkout the branch you want to deploy locally, only on the server...

capistrano deployment unable to bundle install gem with no internet connection

ruby-on-rails,ruby,ruby-on-rails-3,capistrano

This quote from bundler docs might be relevant (emphasis mine): http://bundler.io/v1.9/bundle_package.html By default, if you simply run bundle install after running bundle package, Bundler will still connect to rubygems.org to check whether a platform-specific gem exists for any of the gems in vendor/cache. This behavior can be avoided by instead...

git exit status: 2 with capistrano

ruby-on-rails,git,ruby-on-rails-4,capistrano

I just run into same problem. The root cause is the branch you specified is not on the remote git repo yet. I'm using git flow so I specify my branch as develop. after push this branch to remote and deploy again the problem is gone.

Capistrano not pushing binstub to server

ruby-on-rails,ruby-on-rails-4,capistrano,bundler,capistrano3

please check if you have added "bin" folder into "linked_dir" call of your Capistrano script. If you have added then you have to copy file to the server into location your_app/shared/bin/ If not then it will work by check in that file into repository. ...

Capistrano: linked file database.yml does not exist on my.server.ipadress

ruby-on-rails,deployment,ssh,capistrano

Just create /home/deploy/myrailsapp/shared/config/database.yml file manually and adjust it. Capistrano doesn't create (or manage) configuration file out of the box. So, you should do it manually or automate use own Capistrano scripts, Puppet, Chef, Ansible tools. ...

Deploying application to two different servers, with different production.rb contents

ruby-on-rails,ruby,git,capistrano

Using different branch(git) for each. Do it this way if and only if: You want each of the server apps to have markedly different features, and the features interfere with each other i.e. there is no easy way to use a server-specific feature flag. For example, if one server...

Where should I put my deployment tasks when using Capistrano?

ruby-on-rails,sinatra,capistrano,capistrano3

If that's all you got, it might be just fine leaving it in deploy.rb. If you really want to move those tasks somewhere, below contents of Capfile (you likely have it in the root of your project) should give you a hint: # Load custom tasks from `lib/capistrano/tasks' if you...

cap error trying to deploy not working

ruby-on-rails,ruby,ubuntu,capistrano

no such file to load -- whenever/capistrano You're requiring 'whenever/capistrano' somewhere (probably your deploy.rb), and don't have that gem. Don't do that, or get the gem....

Capistrano doesn't set RAILS_ENV for bundler

ruby-on-rails,capistrano,bundler,capistrano3

I guess if there's no better way... I ended up using a method illustrated somewhere else in SO and modified it for my needs. Modify Gemfile to contain: # Read environment from A) Explicit set through command, B) Existence of override file's contents or C) Default to development RAILS_ENV =...

run capistrano 3 custom setup scripts as root once

capistrano,capistrano3

The way I finally solved it was by adding another role for the same server. role :app, '[email protected]' role :install, '[email protected]', :no_release => true And then doing something like this desc 'Install nginx' task :install do on roles(:install) do require 'erb' template = ERB.new(File.new('deploy/templates/nginx.conf.erb').read).result(binding) upload! StringIO.new(template), "/etc/nginx/conf.d/#{fetch(:domain)}.conf" end on roles(:app)...

ngCkeditor and Ckeditor, deploying assets

ruby-on-rails,deployment,capistrano,asset-pipeline,bower

For anyone that might need help with that, i resolved the issue by config.assets.js_compressor = Uglifier.new(mangle: false) ...

Capistrano Pointing to Old Release That No Longer Exists

ruby-on-rails,capistrano,asset-pipeline,sprockets

I've solved the problem by moving my angular_js gem out of the assets group and into the all group in my bundler. I also did an apache restart from within the server instead of rebooting from the hosting website. Thanks for all the help though!

Getting through Capistrano configuration with Whenever gem

ruby-on-rails,ruby,ruby-on-rails-4,capistrano,whenever

I am not sure, why do you think that capistrano should run your task on rails server command. Capistrano serves for deploy purposes and unrelated to your local rails server starting. By including require "whenever/capistrano" this line in Capfile, you tell capistrano to rewrite crontab on each deploy. It will...

Is it possible to forward X11 windows in a Capistrano 3?

ssh,capistrano,capistrano3,x11-forwarding,sshkit

Capistrano is to automate deployment using some sort of *sh script on the remote computer. Forwarding X11 Windows would make the user having to interact with the window. Therefore I ended up using a Bash script, Sikuli and Xvfb to automate the solution.

Composer Undefined variable: auth

php,capistrano,composer-php

It was missing the credentials for the private repository.

Capistrano: SSHKit::Command::Failed: bundle exit status: 1

ruby-on-rails,ruby,ruby-on-rails-4,capistrano,capistrano3

Change [email protected]:zolzaya/mongoid_auto_increment.git to git://github.com/zolzaya/mongoid_auto_increment.git This should work....

Capistrano: How to share Capistrano tasks?

ruby-on-rails,deployment,capistrano,capistrano3,rvm-capistrano

A typical multistage configuration of Capistrano would have the following files: Capfile config/deploy.rb config/deploy/staging.rb config/deploy/production.rb The tasks placed in staging.rb or production.rb are available only in those environments. If you want some tasks accessible by any environment, you can place them in config/deploy.rb. If you want to extract them into...

Error with cap deploy:cold in Digital Ocean for Rails app

ruby-on-rails,capistrano,spree,railstutorial.org,digital-ocean

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...

Capistrano and XSendFile configuration

ruby-on-rails,apache,capistrano,passenger,x-sendfile

I finally managed to make it work. A few tips for the ones who will have problems with XSendFile I set XSendFilePath to user's $HOME, there are no symlinks on the path to $HOME, so it works. I can accept this from functional and security point of view, but it...

Capistrano v3 - Hook to run command post deploy

deployment,capistrano,capistrano3

This works for me before :published, :fpm_reload desc 'Fpm reload' task :fpm_reload do on release_roles :all do |host| execute :service, 'php5-fpm', :reload end end The docs: http://capistranorb.com/documentation/getting-started/flow/...

Hiredis fails when deploying with capistrano

ruby-on-rails,redis,capistrano,hiredis,redis-rails

rb_thread_select has been deprecated and removed from trunk so you will need to use a current version of hiredis which has removed the rb_thread_select dependency.

What does this unix command means? [closed]

bash,.htaccess,unix,ssh,capistrano

For env1 env - run a program in a modified environment For [/test1 test - check file types and compare values -f FILE     FILE exists and is a regular file -L FILE     FILE exists and is a symbolic link (same as -h) ...

Capistrano deploy to many nodes on the same Cloud Service

ruby-on-rails,azure,capistrano

Capistrano checks for unique server names. You can use ssh aliases in ~/.ssh/config to workaround the problem. server 'ssh_aliases1', roles: %w{web} server 'ssh_aliases2', roles: %w{web} And add this to ~/.ssh/config Host ssh_aliases1 HostName myservice.cloudapp.net User azureuser port 53458 Host ssh_aliases2 HostName myservice.cloudapp.net User azureuser port 62434 ...

Resque Capistrano Deployment in Rails

ruby-on-rails-3,capistrano,resque

It really depends on the size of your app. From my experience, generally a single Resque worker isn't much larger than your app's footprint. However, if your Resque worker will instantiate a lot of large objects, the size of the Resque instance could grow very quickly. Check out the...

ssh_options parsing fails in capistrano3

ssh,capistrano,capistrano3

Your ssh_options is not a valid Hash. It should be sth like this: ssh_options = {keys: ["#{ENV['HOME']}/.ssh/dev.pem"], forward_agent: true} ...

How can I continue to use Accurev with Capistrano 3?

ruby-on-rails,capistrano,capistrano3,accurev

As Capistrano3 documentation says - there is only git, hg and svn support. But it should not be so hard to port old accurev module from Capistrano 2 to Capistrano 3. Some classes changed but core is same - functions have to return proper commands with proper parameters. You can...

Clear doctrine cache in redis on deploy

symfony2,doctrine2,redis,capistrano

So seems i was trying to overcomplicate things because of my own lack of knowledge. I solved the problem using Doctrine Cache namespaces I'm using SncRediBundle and the solutions was simply to use this config: doctrine: metadata_cache: client: cache namespace: "%kernel.root_dir%" entity_manager: default ...

Capistrano deploy to different path on same server

ruby-on-rails,ruby-on-rails-3,capistrano,capistrano3

In your config file: set :deploy_to, ENV["DEPLOY_PATH"] Then, to deploy, run the command setting the DEPLOY_PATH variable: DEPLOY_PATH="my/path" cap production deploy ...

Intercity chef-repo Capistrano asking for deploy password

ruby-on-rails,capistrano,chef

Check that you can log in via normal SSH manually. Guessing you didn't get the SSH keys installed correctly.

Unable to deploy through capistrano after ubuntu upgrade

ruby-on-rails,ubuntu,ruby-on-rails-4,deployment,capistrano

I suppose that the RSA identity is not added to the authentication agent. To add the identity, just run the command ssh-add ~/.ssh/id_rsa...

~/.ssh/id_rsa.pub not found error while installing capistrano as ansible playbook

wordpress,capistrano,ansible-playbook

It seems the role is trying to find your local public key. It should be in the location in the error message '~/.ssh/id_rsa.pub', but it's not. So either you don't have one, or you keep it in another location. If you're not familiar with generating SSH keys you probably don't...

Rails3 capistrano, postgresql roles and deploying assets

postgresql,ruby-on-rails-3.2,capistrano,asset-pipeline

What follows is a patch, but not a proper answer to the problem. It all has to do with postgresql and its roles. My database.yml file being .gitignore(d) I had different values for username (or 'role' for postgresql) sudo su localhostUser which was not postgre (complicating matters a bit, throwing...

Capistrano doesn't run all migrations

ruby-on-rails,nginx,capistrano

Works fine now. Removed the before_fork and after_fork section and it works fine now with rails/migration from capistrano in place.

Wrong task ordering in capistrano v3.2

ruby-on-rails,ruby,capistrano

Works for me: Matt-Gibsons-iMac:captest matt$ cap -V Capistrano Version: 3.2.1 (Rake Version: 10.1.0) Matt-Gibsons-iMac:captest matt$ cap staging test_ordering:start_testing This task must fire first, before starting task This task must be in the middle This task must be the last All I did was cap init, paste your code into /lib/capistrano/tasks/test_ordering.rake,...

can't deploy the project with capistrano

ruby-on-rails,capistrano,capistrano3

I added gem 'capistrano', '~> 3.2.1' to Gemfile. After $ bundle update the problem fixed.

running rpush as daemon in production using capistrano

ruby-on-rails,push-notification,capistrano

For Capistrano 3: after :finished, :restart_rpush do on roles(:web) do within release_path do with rails_env: fetch(:rails_env) do execute :bundle, :exec, "rpush stop -e #{fetch(:rails_env)}" execute :bundle, :exec, "rpush start -e #{fetch(:rails_env)}" end end end end Then check that tmp and other directories is linked correctly: set :linked_dirs, %w{log tmp/pids tmp/cache...

Nitrous.io: Deploying with capistrano results in “ERROR: Repository not found” despite being able to view remote, push/pull, etc

git,github,deployment,capistrano,nitrousio

The answer was that I had to run the following commands from the Nitrous.io terminal: eval `ssh-agent` ssh-add Not sure why I was able to complete the other actions (ssh into server, pull from/push to GitHub) without having done this. ...

Capistrano Many Private Repo Github

ruby-on-rails,ruby,git,github,capistrano

Had this error last night We had to use this to get around that error: set :repository, 'https://username:[email protected]/username/repo.git' We're refactoring, but it worked for us...

Please require this file from within a Capistrano recipe (LoadError)

ruby-on-rails-3,capistrano

The problem is with rvm-capistrano. Correct it in gemfile. require: false gem 'rvm-capistrano', require: false This should help...

rails 4.1 can't deploy via capistrano 3

ruby-on-rails,ruby,capistrano,ruby-on-rails-4.1,libyaml

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...

Rails 4.2 capistrano 3 deployment

ruby-on-rails,git,deployment,capistrano,vps

You can set up your own private git server, then in deploy.rb you can put something like set :repo_url, 'ssh://[email protected]_ip/path/to/your_git_repo.git' When you commit your changes to the git repo, you do not have to upload the app to the server. Capistrano will upload the app for you when you deploy....

Puma server hangs after capistrano “puma:restart” signal is sent

ruby-on-rails,nginx,capistrano,puma

Using the information I found in this other Stack Overflow answer, I was able to implement a heartbeat that fixes this situation it seems. I haven't fully understood all of the mechanics myself, but I started with an initializer to start the heartbeat: config/initializers/redis.rb REDIS = Redis.new(url: "redist://localhost:6379") heartbeat_thread =...

Carrierwave uploaded Images aren't persistent after Capistrano deploy

ruby-on-rails,ruby,image,capistrano,rubber

By default, Capistrano links public/system directory. So to persist your images, just change def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end to def store_dir "system/uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end ...

Rails Capistrano - SSHKit::Command::Failed: bundle exit status: 16

ruby-on-rails,ruby,git,capistrano

DEBUG [1ac6e919] You are trying to install in deployment mode after changing DEBUG [1ac6e919] your Gemfile. Run `bundle install` elsewhere and add the DEBUG [1ac6e919] updated Gemfile.lock to version control. DEBUG [1ac6e919] DEBUG [1ac6e919] You have added to the Gemfile: DEBUG [1ac6e919] * pg The above part of the backtrace...

'Don't know how to build task' error in Capistrano 3

capistrano,capistrano3

Take a look at this commit. They've switched from .cap to .rake 3 months ago. The whole idea is to make capistrano3 fully rake-compatible. Just use .rake extension for you tasks....

Rails deployment with Capistrano failing

ruby-on-rails,deployment,capistrano,production

You should call remote_file without any namespaces. namespace :deploy do namespace :check do task :linked_files => 'config/database.yml' end ... end remote_file 'config/database.yml' => '/home/ubuntu/workspace/config/database.yml' ...

SSH-ADD Key getting Flushed

osx,ssh,capistrano,ssh-keys,ssh-agent

You need to store the passphrase in you keychain. Try: ssh-add -K private-key Hope this helps....

Passenger Rails 4 App Startup = Uninitialized Constant ActiveModel::Serializer

ruby-on-rails,capistrano,passenger,chef

I noticed: uninitialized constant ActiveModel::Serializer (NameError) This is the active_model_serializers gem. It looks like it isn't installed or in the Gemfile. I've seen this happen (with other gems) that I have installed locally on my dev box but forgot to include in the Gemfile....