Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Trouble deploying rails 3.1rc5 #1345

Closed
sreid99 opened this issue Aug 9, 2011 · 11 comments
Closed

Trouble deploying rails 3.1rc5 #1345

sreid99 opened this issue Aug 9, 2011 · 11 comments
Milestone

Comments

@sreid99
Copy link

sreid99 commented Aug 9, 2011

I've updated an app from rails 3.0.9 to 3.1rc5 on my development pc, and it's working fine. However, when I try to update the deployed app using capistrano (previously working), I'm now getting an error :

  • executing "cd /home/.../releases/20110809083322 && bundle install --gemfile /home/.../releases/20110809083322/Gemfile --path /home/.../shared/bundle --quiet --without development test resque_development resque_scheduler_development"
    servers: ["..."]
    [...] executing command
    ** [out :: ...] ←[31mCould not find activesupport-3.1.0.rc5 in any of the sources←[0m

In my gemfile I have :

source 'http://rubygems.org'
gem 'rails', '3.1.0rc5'
etc.

Any suggestions ?

@sreid99
Copy link
Author

sreid99 commented Aug 9, 2011

If I revert bundler on the server from 1.0.17 to 1.0.15 the above error disappears. 1.0.17 on the development PC doesn't show this problem.

@cldwalker
Copy link
Contributor

As with your dev environment, I have no problem installing just rails 3.1.0rc5 for 1.0.17. We'll need your full Gemfile, Gemfile.lock, server environment, etc to reproduce this.

@effkay
Copy link

effkay commented Aug 16, 2011

I have the same problem. I used bundle pack locally, and the capistrano deployment fails with this error:

 ** [out :: someproject.ch] Some gems seem to be missing from your vendor/cache directory.
 ** [out :: someproject.ch] Could not find activesupport-3.1.0.rc5 in any of the sources

This is my Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.0.rc5'
gem 'mysql2'
gem 'json'
gem 'jquery-rails'
gem 'haml'
gem 'kuhsaft'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
gem 'capistrano'
gem 'capistrano-ext'
gem 'capistrano_colors'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "~> 3.1.0.rc"
  gem 'coffee-rails', "~> 3.1.0.rc"
  gem 'uglifier'
end

# Gems used in dev and test envs
group :development, :test do
  gem 'rspec'
  gem 'rspec-rails'
  gem 'ruby-debug'
  gem 'guard'
  gem 'guard-rspec'
  gem 'guard-spork'
  gem 'growl'
  gem 'capybara'
  gem 'rb-fsevent'
end

And my Gemfile.lock:

GIT
  remote: https://github.com/chriseppstein/compass.git
  revision: 91a748a916360057b5caf6ea85cd38441d3b257a
  branch: rails31
  specs:
    compass (0.12.0.alpha.0.91a748a)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.1)

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (3.1.0.rc5)
      actionpack (= 3.1.0.rc5)
      mail (~> 2.3.0)
    actionpack (3.1.0.rc5)
      activemodel (= 3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      i18n (~> 0.6)
      rack (~> 1.3.1)
      rack-cache (~> 1.0.2)
      rack-mount (~> 0.8.1)
      rack-test (~> 0.6.0)
      sprockets (~> 2.0.0.beta.12)
    activemodel (3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
      bcrypt-ruby (~> 2.1.4)
      builder (~> 3.0.0)
      i18n (~> 0.6)
    activerecord (3.1.0.rc5)
      activemodel (= 3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
      arel (~> 2.1.4)
      tzinfo (~> 0.3.29)
    activeresource (3.1.0.rc5)
      activemodel (= 3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
    activesupport (3.1.0.rc5)
      multi_json (~> 1.0)
    acts-as-taggable-on (2.0.6)
    arel (2.1.4)
    bcrypt-ruby (2.1.4)
    builder (3.0.0)
    capistrano (2.8.0)
      highline
      net-scp (>= 1.0.0)
      net-sftp (>= 2.0.0)
      net-ssh (>= 2.0.14)
      net-ssh-gateway (>= 1.1.0)
    capistrano-ext (1.2.1)
      capistrano (>= 1.0.0)
    capistrano_colors (0.5.4)
    capybara (1.0.1)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    carrierwave (0.5.2)
      activesupport (~> 3.0)
    childprocess (0.2.1)
      ffi (~> 1.0.6)
    chunky_png (1.2.1)
    coffee-rails (3.1.0.rc.5)
      actionpack (~> 3.1.0.rc1)
      coffee-script (>= 2.2.0)
      railties (~> 3.1.0.rc1)
      sprockets (>= 2.0.0.beta.9)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.1.2)
    columnize (0.3.4)
    diff-lcs (1.1.2)
    erubis (2.7.0)
    execjs (1.2.4)
      multi_json (~> 1.0)
    ffi (1.0.9)
    fssm (0.2.7)
    growl (1.0.3)
    guard (0.6.1)
      thor (~> 0.14.6)
    guard-rspec (0.4.1)
      guard (>= 0.4.0)
    guard-spork (0.2.1)
      guard (>= 0.2.2)
      spork (>= 0.8.4)
    haml (3.1.2)
    highline (1.6.2)
    hike (1.2.0)
    i18n (0.6.0)
    jquery-rails (1.0.13)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.5.3)
    json_pure (1.5.3)
    kuhsaft (0.3.1)
      acts-as-taggable-on (= 2.0.6)
      carrierwave (= 0.5.2)
      compass (>= 0.11.1)
      haml (~> 3.1)
      rails (~> 3.0)
      rdiscount
      rmagick (= 2.12.2)
      simple_form
    linecache (0.46)
      rbx-require-relative (> 0.0.4)
    mail (2.3.0)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    multi_json (1.0.3)
    mysql2 (0.3.6)
    net-scp (1.0.4)
      net-ssh (>= 1.99.1)
    net-sftp (2.0.5)
      net-ssh (>= 2.0.9)
    net-ssh (2.1.4)
    net-ssh-gateway (1.1.0)
      net-ssh (>= 1.99.1)
    nokogiri (1.5.0)
    polyglot (0.3.2)
    rack (1.3.2)
    rack-cache (1.0.2)
      rack (>= 0.4)
    rack-mount (0.8.2)
      rack (>= 1.0.0)
    rack-ssl (1.3.2)
      rack
    rack-test (0.6.1)
      rack (>= 1.0)
    rails (3.1.0.rc5)
      actionmailer (= 3.1.0.rc5)
      actionpack (= 3.1.0.rc5)
      activerecord (= 3.1.0.rc5)
      activeresource (= 3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
      bundler (~> 1.0)
      railties (= 3.1.0.rc5)
    railties (3.1.0.rc5)
      actionpack (= 3.1.0.rc5)
      activesupport (= 3.1.0.rc5)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (~> 0.14.6)
    rake (0.9.2)
    rb-fsevent (0.4.3)
    rbx-require-relative (0.0.5)
    rdiscount (1.6.8)
    rdoc (3.9.2)
    rmagick (2.12.2)
    rspec (2.6.0)
      rspec-core (~> 2.6.0)
      rspec-expectations (~> 2.6.0)
      rspec-mocks (~> 2.6.0)
    rspec-core (2.6.4)
    rspec-expectations (2.6.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.6.0)
    rspec-rails (2.6.1)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.6.0)
    ruby-debug (0.10.4)
      columnize (>= 0.1)
      ruby-debug-base (~> 0.10.4.0)
    ruby-debug-base (0.10.4)
      linecache (>= 0.3)
    rubyzip (0.9.4)
    sass (3.1.7)
    sass-rails (3.1.0.rc.5)
      actionpack (~> 3.1.0.rc1)
      railties (~> 3.1.0.rc1)
      sass (>= 3.1.4)
      sprockets (>= 2.0.0.beta.9)
    selenium-webdriver (2.4.0)
      childprocess (>= 0.2.1)
      ffi (>= 1.0.7)
      json_pure
      rubyzip
    simple_form (1.4.2)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    spork (0.8.5)
    sprockets (2.0.0.beta.13)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    thor (0.14.6)
    tilt (1.3.2)
    treetop (1.4.10)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.29)
    uglifier (1.0.0)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  capistrano
  capistrano-ext
  capistrano_colors
  capybara
  coffee-rails (~> 3.1.0.rc)
  compass!
  growl
  guard
  guard-rspec
  guard-spork
  haml
  jquery-rails
  json
  kuhsaft
  mysql2
  rails (= 3.1.0.rc5)
  rb-fsevent
  rspec
  rspec-rails
  ruby-debug
  sass-rails (~> 3.1.0.rc)
  uglifier

I also noticed that when I run bundle pack I see the following output:

Updating .gem files in vendor/cache
  * activesupport-3.1.0.rc5.gem
  * activemodel-3.1.0.rc5.gem
  * actionpack-3.1.0.rc5.gem
  * actionmailer-3.1.0.rc5.gem
  * activerecord-3.1.0.rc5.gem
  * activeresource-3.1.0.rc5.gem
  * railties-3.1.0.rc5.gem
  * rails-3.1.0.rc5.gem
Removing outdated .gem files from vendor/cache
  * actionmailer-3.1.0.rc5.gem
  * actionpack-3.1.0.rc5.gem
  * activemodel-3.1.0.rc5.gem
  * activerecord-3.1.0.rc5.gem
  * activeresource-3.1.0.rc5.gem
  * activesupport-3.1.0.rc5.gem
  * rails-3.1.0.rc5.gem
  * railties-3.1.0.rc5.gem

Which looks like it would be updating the RC5 gems, and then immediately removing them again?? The RC5 gems listed above are not in the vendor/cache directory, so I'm assuming it has nothing to do with the server env but rather with wath bundle pack does?

@effkay
Copy link

effkay commented Aug 16, 2011

I think this has something to do with #1202 and #1054, but those issues were closed by 833c601. I can still reproduce the error by checking out the 1-0-stable branch and building & installing the 1.0.18 gem.

For the record: I'm also on rubygems 1.3.7.

@promisedlandt
Copy link

We have a similar problem while deploying with capistrano.

Some gems seem to be missing from your vendor/cache directory.
Could not find net-ssh-2.1.4 in any of the sources

while running

failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.2@censored_app' -c 'cd /home/rails/apps/censored/releases/20110822102545 && bundle install --gemfile /home/rails/apps/censored/releases/20110822102545/Gemfile --path /home/rails/apps/censored/shared/bundle --deployment --quiet --without development test'" on censored

Here's a gist with our Gemfile, Gemfile.lock etc:
https://gist.github.com/1162113

It does not appear to be the same problem because switching to bundler versions 1.0.15, 1.0.17 or 1.1.pre.8 does not fix the problem.

@ghost
Copy link

ghost commented Sep 6, 2011

I was having the same issue. When I moved load 'deploy/assets' out of my Capfile into config/deploy.rb just after require 'bundler/capistrano' -- then this issue goes away. Good guess that this has something to do with bundler/capistrano munging something up.

@indirect
Copy link
Member

Guys, precompiling assets requires your bundle to already be installed. If you try to run the assets hooks before you bundle, it will not work.

@indirect
Copy link
Member

Hopefully that explains why you need to require 'deploy/assets' after you require 'bundler/capistrano' :)

@ghost
Copy link

ghost commented Sep 17, 2011

I think that explains some of the issues here but not all; my deploy script was running a bundle install before building assets.

@indirect
Copy link
Member

If anyone else on this ticket is still seeing issues, please open a new ticket and provide the information listed in ISSUES. Thanks!

@dleavitt
Copy link

For other forlorn Googlers:
#1454

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants