Rails 4 doesn't detect application after capistrano deployment

Awea

I'm currently trying to deploy a Rails 4 app using Capistrano 3. All going smoothly but I've got an issue, yeah ! I can't run any rails commands in my app.

Here is my related capistrano plugins :

gem 'capistrano-rails'
gem 'capistrano-unicorn-nginx'
gem 'capistrano-rbenv'
gem 'capistrano-secrets-yml'
gem 'capistrano-rails-console'

So when I run a cap production rails:console it give me this output:

    [b2458a1e] Running /usr/bin/env [ -d ~/.rbenv/versions/2.1.1 ] as [email protected]
DEBUG [b2458a1e] Command: [ -d ~/.rbenv/versions/2.1.1 ]
DEBUG [b2458a1e] Finished in 0.528 seconds with exit status 0 (successful).
INFO [2d552562] Running ~/.rbenv/bin/rbenv exec bundle exec rails console production as [email protected]
DEBUG [2d552562] Command: ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.1 ~/.rbenv/bin/rbenv exec bundle exec rails console production )
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /home/rails_app/.rbenv/versions/2.1.1/bin/ruby
  -m, [--template=TEMPLATE]                              # Path to some application template (can be a filesystem path or URL)
      [--skip-gemfile], [--no-skip-gemfile]              # Don't create a Gemfile
  -B, [--skip-bundle], [--no-skip-bundle]                # Don't run bundle install
  -G, [--skip-git], [--no-skip-git]                      # Skip .gitignore file
      [--skip-keeps], [--no-skip-keeps]                  # Skip source control .keep files
  -O, [--skip-active-record], [--no-skip-active-record]  # Skip Active Record files
  -S, [--skip-sprockets], [--no-skip-sprockets]          # Skip Sprockets files
      [--skip-spring], [--no-skip-spring]                # Don't install Spring application preloader
  -d, [--database=DATABASE]                              # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/    frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
                                                         # Default: sqlite3
  -j, [--javascript=JAVASCRIPT]                          # Preconfigure for selected JavaScript library
                                                         # Default: jquery
  -J, [--skip-javascript], [--no-skip-javascript]        # Skip JavaScript files
      [--dev], [--no-dev]                                # Setup the application with Gemfile pointing to your Rails checkout
      [--edge], [--no-edge]                              # Setup the application with Gemfile pointing to Rails repository
      [--skip-turbolinks], [--no-skip-turbolinks]        # Skip turbolinks gem
  -T, [--skip-test-unit], [--no-skip-test-unit]          # Skip Test::Unit files
      [--rc=RC]

Any idea ?

update 13/03 - add deploy.rb

# config valid only for current version of Capistrano
lock '3.3.5'

set :application, 'my_app'
set :repo_url, '[email protected]:foo/my_app.git'

# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
set :branch, 'master'

# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/var/www/my_app'

# Default value for :linked_files is []
set :linked_files, fetch(:linked_files, []).push('config/database.yml')

# Default value for linked_dirs is []
set :linked_dirs, fetch(:linked_dirs, []).push('bin', 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system')

set :rbenv_ruby, '2.1.1'
Matt Brictson

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:

  1. 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.
  2. Remove bin from Capistrano's :linked_dirs setting in your deploy.rb.
  3. Re-deploy.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Rails assets aren't compiling after Capistrano deployment

From Dev

run rails applicaton after capistrano deployment

From Dev

Capistrano 3 deployment for Rails 4 binstubs conflict?

From Dev

Rails 4 Capistrano deployment cannot find activesupport

From Dev

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

From Dev

Resque Capistrano Deployment in Rails

From Dev

Application deployment doesn't work after adding QSound

From Dev

Application deployment doesn't work after adding QSound

From Dev

Rails 4 / Capistrano 3 Deployment Stopped Working (no errors)

From Dev

Rails 4 / Capistrano 3 Deployment Stopped Working (no errors)

From Dev

Rails 4 Capistrano Still uses old release after Deploy

From Dev

Capistrano doesn't set RAILS_ENV for bundler

From Dev

Rails Heroku “The page you were looking for doesn’t exist.” after deployment

From Dev

Rails Heroku “The page you were looking for doesn’t exist.” after deployment

From Dev

Capistrano doesn't install

From Dev

RubyMine 8 doesn't detect Rails gem after installation, cannot create project

From Dev

Rails 4 API deployment example to Amazon EC2 using Capistrano 3, Nginx, Puma, GitHub, and RVM?

From Dev

Ruby on Rails: Capistrano 3 deployment error

From Dev

Capistrano could not locate Gemfile error on application deployment

From Dev

Rails 4 sass application file doesn't read in css file imported

From Dev

Capistrano 3 doesn't create 'current' directory when I deploy my rails project

From Dev

Background image doesn't work after assets precompile in RAILS4 production environment

From Dev

Rails assets missing after Capistrano deploy

From Dev

Rails deployment to staging using capistrano generates the following error

From Dev

/usr/bin/env and Capistrano 3 failures in Rails Deployment

From Dev

/usr/bin/env and Capistrano 3 failures in Rails Deployment

From Dev

Ruby on rails 4.1.6 + Capistrano 3: purge gems on deployment server

From Dev

Capistrano and Rails deployment, unable to access bitbucket repo from ubuntu server

From Dev

Rails Capistrano - Whenever Cron appends cron jobs for every Deployment

Related Related

  1. 1

    Rails assets aren't compiling after Capistrano deployment

  2. 2

    run rails applicaton after capistrano deployment

  3. 3

    Capistrano 3 deployment for Rails 4 binstubs conflict?

  4. 4

    Rails 4 Capistrano deployment cannot find activesupport

  5. 5

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

  6. 6

    Resque Capistrano Deployment in Rails

  7. 7

    Application deployment doesn't work after adding QSound

  8. 8

    Application deployment doesn't work after adding QSound

  9. 9

    Rails 4 / Capistrano 3 Deployment Stopped Working (no errors)

  10. 10

    Rails 4 / Capistrano 3 Deployment Stopped Working (no errors)

  11. 11

    Rails 4 Capistrano Still uses old release after Deploy

  12. 12

    Capistrano doesn't set RAILS_ENV for bundler

  13. 13

    Rails Heroku “The page you were looking for doesn’t exist.” after deployment

  14. 14

    Rails Heroku “The page you were looking for doesn’t exist.” after deployment

  15. 15

    Capistrano doesn't install

  16. 16

    RubyMine 8 doesn't detect Rails gem after installation, cannot create project

  17. 17

    Rails 4 API deployment example to Amazon EC2 using Capistrano 3, Nginx, Puma, GitHub, and RVM?

  18. 18

    Ruby on Rails: Capistrano 3 deployment error

  19. 19

    Capistrano could not locate Gemfile error on application deployment

  20. 20

    Rails 4 sass application file doesn't read in css file imported

  21. 21

    Capistrano 3 doesn't create 'current' directory when I deploy my rails project

  22. 22

    Background image doesn't work after assets precompile in RAILS4 production environment

  23. 23

    Rails assets missing after Capistrano deploy

  24. 24

    Rails deployment to staging using capistrano generates the following error

  25. 25

    /usr/bin/env and Capistrano 3 failures in Rails Deployment

  26. 26

    /usr/bin/env and Capistrano 3 failures in Rails Deployment

  27. 27

    Ruby on rails 4.1.6 + Capistrano 3: purge gems on deployment server

  28. 28

    Capistrano and Rails deployment, unable to access bitbucket repo from ubuntu server

  29. 29

    Rails Capistrano - Whenever Cron appends cron jobs for every Deployment

HotTag

Archive