Deploying rails - Could not find rake-11.1.2 in any of the sources

tdelam

I am trying to run cap deploy on a project. I keep getting this error, I am not sure where it comes from:

    ➜  example git:(master) cap deploy
      * 2016-04-04 19:19:10 executing `deploy'
      * 2016-04-04 19:19:10 executing `deploy:update'
     ** transaction: start
      * 2016-04-04 19:19:10 executing `deploy:update_code'
        executing locally: "git ls-remote [email protected]:tdelam/example.git HEAD"
        command finished in 807ms
      * executing "git clone -q [email protected]:tdelam/example.git /srv/rails_apps/example/releases/20160404231911 && cd /srv/rails_apps/example/releases/20160404231911 && git checkout -q -b deploy 24f9d11882b2481d4c2f0cac1fe87095f265cfea && (echo 24f9d11882b2481d4c2f0cac1fe87095f265cfea > /srv/rails_apps/example/releases/20160404231911/REVISION)"
        servers: ["56.223.75.114"]
        [56.223.75.114] executing command
        command finished in 2598ms
      * 2016-04-04 19:19:14 executing `deploy:finalize_update'
        triggering before callbacks for `deploy:finalize_update'
      * 2016-04-04 19:19:14 executing `deploy:assets:symlink'
      * executing "rm -rf /srv/rails_apps/example/releases/20160404231911/public/assets && mkdir -p /srv/rails_apps/example/releases/20160404231911/public && mkdir -p /srv/rails_apps/example/shared/assets && ln -s /srv/rails_apps/example/shared/assets /srv/rails_apps/example/releases/20160404231911/public/assets"
        servers: ["56.223.75.114"]
        [56.223.75.114] executing command
        command finished in 22ms
      * 2016-04-04 19:19:14 executing `bundle:install'
      * executing "cd /srv/rails_apps/example/releases/20160404231911 && bundle install --gemfile /srv/rails_apps/example/releases/20160404231911/Gemfile --path /srv/rails_apps/example/shared/bundle --deployment --quiet --without development test"
        servers: ["56.223.75.114"]
        [56.223.75.114] executing command
     ** [out :: 56.223.75.114] Could not find rake-11.1.2 in any of the sources
        command finished in 6530ms
    *** [deploy:update_code] rolling back
      * executing "rm -rf /srv/rails_apps/example/releases/20160404231911; true"
        servers: ["56.223.75.114"]
        [56.223.75.114] executing command
        command finished in 34ms
    failed: "sh -c 'cd /srv/rails_apps/example/releases/20160404231911 && bundle install --gemfile /srv/rails_apps/example/releases/20160404231911/Gemfile --path /srv/rails_apps/example/shared/bundle --deployment --quiet --without development test'" on 56.223.75.114

My capfile is pretty simple:

  set :application, "example"
  set :repository, "[email protected]:tdelam/example.git"

  #set :rvm_type, :system
  set :scm, :git
  # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

  set :user, "jeffc"
  set :deploy_to, "/srv/rails_apps/#{application}"

  set :use_sudo, true

  set :keep_releases, 5

  role :web, "56.223.75.114"                          # Your HTTP server, Apache/etc
  role :app, "56.223.75.114"                          # This may be the same as your `Web` server
  role :db,  "56.223.75.114", :primary => true # This is where Rails migrations will run
  role :db,  "56.223.75.114"


  namespace :deploy do
    task :start do ; end
    task :stop do ; end
    task :restart, :roles => :app, :except => { :no_release => true } do
      run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
    end
  end

and last but not least, here is the rake version it is complaining about:

➜  example git:(master) rake --version
rake, version 11.1.2

This rake version is both on my development machine as well as my server

EDIT: My ruby version on the server is ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]

Here is my Gemfile: source 'https://rubygems.org'

    gem 'rails', '3.2.15'

    group :development, :test do
      gem 'sqlite3'
      gem 'capistrano', '~> 2.15.7'
      gem 'thin'
      #gem 'rvm-capistrano'
    end


    # Gems used only for assets and not required
    # in production environments by default.
    group :assets do
      gem 'sass-rails',   '~> 3.2.3'
      gem 'coffee-rails', '~> 3.2.1'
      gem 'execjs'
      gem 'therubyracer'
      gem 'uglifier', '>= 1.0.3'
    end

    group :production do
      gem 'mysql2','> 0.3'
    end

    gem 'jquery-rails'

    # Refinery CMS
    gem 'refinerycms', '~> 2.1.0'

    # Optionally, specify additional Refinery CMS Extensions here:
    gem 'refinerycms-acts-as-indexed', '~> 1.0.0'

Does anyone have a suggestion as to what's going on?

Adriano Godoy

Make sure that bundler was installed without sudo user and try to remove use_sudo from Capfile:

set :use_sudo, false

To help I created a step-by-step to create a ruby on rails project using Capistrano on Ubuntu 14.04: https://gist.github.com/Godoy/7a04acf42a382bd03ed1

Works pretty well in my projects. Good lucky!

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: Could not find rake-10.1.1 in any of the sources

From Dev

Rails rake updating issue - Could not find rake-10.4.2 in any of the sources

From Dev

rails s: Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

From Dev

Capistrano: Could not find rake-$WRONG_VERSION in any of the sources

From Dev

Rubymine - Uncaught exception: Could not find rake-10.1.0 in any of the sources

From Dev

Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources

From Dev

Could not find rake-0.9.2 in any of the sources - Ubuntu 16.04

From Dev

Ruby on Rails - Could not find xpath-2.0.0 in any of the sources

From Dev

Ruby on Rails - Could not find xpath-2.0.0 in any of the sources

From Dev

Rails not finding gem. "Could not find .. in any of the sources"

From Dev

Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound) on HTTPS push

From Dev

Error "Could not find rake-10.5.0 in any of the sources" on Phusion Passenger Docker image

From Dev

error:: could not find rake-11.1.2 in any of the sources run `bundle install` to install missing gems

From Dev

Capistrano -- Could not find *** in any of the sources

From Dev

Capistrano error: 'Could not find form_data-0.1.0 in any of the sources' while deploying

From Dev

Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound) - Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS

From Dev

Could not find rake using whenever rails

From Dev

Could not find bcrypt-3.1.7 in any of the sources

From Dev

Could not find byebug-3.5.1 in any of the sources

From Dev

Could not find ffi-1.9.4 in any of the sources

From Dev

Could not find nokogiri-1.6.7.1 in any of the sources

From Dev

Rails new gives "Could not find proper version of railties (4.2.5.1) in any of the sources" error

From Dev

Not able to run the RoR project using rails s. Could not find pg-0.17.1 in any of the sources

From Dev

Rails 4.2 ActiveJob: Every adapter results in PhusionPassenger error: Could not find [gem] in any of the sources (Bundler::GemNotFound)

From Dev

Rails new gives "Could not find proper version of railties (4.2.5.1) in any of the sources" error

From Dev

Could not find gem mime-types-2.4.1 in any of the sources

From Dev

Could not find thread_safe-0.3.0 in any of the sources

From Dev

error Could not find i18n-0.7.0 in any of the sources

From Dev

Bundler::GemNotFound: Could not find net-ssh-2.7.0 in any of the sources

Related Related

  1. 1

    Rails: Could not find rake-10.1.1 in any of the sources

  2. 2

    Rails rake updating issue - Could not find rake-10.4.2 in any of the sources

  3. 3

    rails s: Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

  4. 4

    Capistrano: Could not find rake-$WRONG_VERSION in any of the sources

  5. 5

    Rubymine - Uncaught exception: Could not find rake-10.1.0 in any of the sources

  6. 6

    Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources

  7. 7

    Could not find rake-0.9.2 in any of the sources - Ubuntu 16.04

  8. 8

    Ruby on Rails - Could not find xpath-2.0.0 in any of the sources

  9. 9

    Ruby on Rails - Could not find xpath-2.0.0 in any of the sources

  10. 10

    Rails not finding gem. "Could not find .. in any of the sources"

  11. 11

    Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound) on HTTPS push

  12. 12

    Error "Could not find rake-10.5.0 in any of the sources" on Phusion Passenger Docker image

  13. 13

    error:: could not find rake-11.1.2 in any of the sources run `bundle install` to install missing gems

  14. 14

    Capistrano -- Could not find *** in any of the sources

  15. 15

    Capistrano error: 'Could not find form_data-0.1.0 in any of the sources' while deploying

  16. 16

    Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound) - Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS

  17. 17

    Could not find rake using whenever rails

  18. 18

    Could not find bcrypt-3.1.7 in any of the sources

  19. 19

    Could not find byebug-3.5.1 in any of the sources

  20. 20

    Could not find ffi-1.9.4 in any of the sources

  21. 21

    Could not find nokogiri-1.6.7.1 in any of the sources

  22. 22

    Rails new gives "Could not find proper version of railties (4.2.5.1) in any of the sources" error

  23. 23

    Not able to run the RoR project using rails s. Could not find pg-0.17.1 in any of the sources

  24. 24

    Rails 4.2 ActiveJob: Every adapter results in PhusionPassenger error: Could not find [gem] in any of the sources (Bundler::GemNotFound)

  25. 25

    Rails new gives "Could not find proper version of railties (4.2.5.1) in any of the sources" error

  26. 26

    Could not find gem mime-types-2.4.1 in any of the sources

  27. 27

    Could not find thread_safe-0.3.0 in any of the sources

  28. 28

    error Could not find i18n-0.7.0 in any of the sources

  29. 29

    Bundler::GemNotFound: Could not find net-ssh-2.7.0 in any of the sources

HotTag

Archive