不知道如何去調試這個錯誤。在開發服務器上部署這個Rails應用程序是成功的,但是當部署到生產服務器時,我得到了bundle stdout: Could not find ruby-oci8-2.2.0 in any of the sources
(錯誤)。在使用Bundler部署Rails應用程序時找不到ruby-oci8
是錯誤消息說它無法在gemset中找到ruby-oci8?關於如何去調試爲什麼部署在生產服務器上不起作用的任何想法?
我使用運行下面的Capistrano的寶石
capistrano (3.4.0)
capistrano-bundler (1.1.4)
capistrano-file-permissions (0.1.1)
capistrano-rails (1.1.3)
capistrano-rvm (0.1.2)
縮短的消息:瓶蓋生產部署
** Invoke deploy:updated (first_time)
** Invoke bundler:install (first_time)
** Execute bundler:install
DEBUG [103a4281] Running /usr/bin/env if test ! -d /home/rails/apps/cals_db_sync/releases/20151020160801; then echo "Directory does not exist '/home/rails/apps/cals_db_sync/releases/20151020160801'" 1>&2; false; fi as [email protected]
DEBUG [103a4281] Command: if test ! -d /home/rails/apps/cals_db_sync/releases/20151020160801; then echo "Directory does not exist '/home/rails/apps/cals_db_sync/releases/20151020160801'" 1>&2; false; fi
DEBUG [103a4281] Finished in 0.006 seconds with exit status 0 (successful).
INFO [60676e5b] Running /usr/local/rvm/bin/rvm [email protected]_db_sync do bundle install --path /home/rails/apps/cals_db_sync/shared/bundle --without development test --deployment --quiet as [email protected]
DEBUG [60676e5b] Command: cd /home/rails/apps/cals_db_sync/releases/20151020160801 && (RVM_BIN_PATH=/usr/local/rvm/bin /usr/local/rvm/bin/rvm [email protected]_db_sync do bundle install --path /home/rails/apps/cals_db_sync/shared/bundle --without development test --deployment --quiet)
DEBUG [60676e5b] Could not find ruby-oci8-2.2.0 in any of the sources
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 7
bundle stdout: Could not find ruby-oci8-2.2.0 in any of the sources
bundle stderr: Nothing written
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 7
bundle stdout: Could not find ruby-oci8-2.2.0 in any of the sources
bundle stderr: Nothing written
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/usr/local/rvm/gems/[email protected]_db_sync/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:35:in `block (5 levels) in <top (required)>'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:85:in `with'
/usr/local/rvm/gems/[email protected]_db_sync/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:26:in `block (4 levels) in <top (required)>'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:77:in `within'
/usr/local/rvm/gems/[email protected]_db_sync/gems/capistrano-bundler-1.1.4/lib/capistrano/tasks/bundler.cap:25:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/usr/local/rvm/gems/[email protected]_db_sync/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => deploy:updated => bundler:install
The deploy has failed with an error: Exception while executing as [email protected]: bundle exit status: 7
bundle stdout: Could not find ruby-oci8-2.2.0 in any of the sources
bundle stderr: Nothing written
** Invoke deploy:failed (first_time)
** Execute deploy:failed
的Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'
gem 'exception_notification'
# Use mysql as the database for Active Record
gem 'mysql2', '0.3.20' # Of 9/2015, the '0.4.*' is BUGGY and BREAKS!
# Build Tabless Models
gem "activerecord-tableless" # , "~> 1.0"
# Due to upgrading this Rails 3 app to Rails 4, needed the below gem to work with
# Rails 4 Mass Assignment Security. (Rails 3 handled Mass Assignment security via Models)
gem 'protected_attributes'
# Using the "Chamber" gem to address Rails 4's "Secret Key Base"
# Install?
# 1- bundle
# 2- add to your project via "$ chamber init"
# a. creates a public key called .chamber.pem.pub
# b. creates a protected key called .chamber.pem.enc
# c. creates a private key called .chamber.pem
# d. adds the protected and private keys to your .gitignore file so they aren't accidentally checked in
# e. creates a settings.yml file to get you started
# Note: Keep the private key safe since anyone who has it will be able to decrypt any settings that Chamber encrypts for you.
gem 'chamber'
# Installed and currently using
# hashie 3.4.2
# chamber 2.8.0
# Whenver Gem needed for Cron Jobs
# run: wheneverize (dot) # or wheneverize . ... use after bundle to setup Whenever
# See whenever output in console by: bundle exec whenever
gem 'whenever', require: false # set to false b/c don't want to use directly within Rails App
gem 'ruby-oci8'
gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0'
# Rails 4.0 & 4.1 => '~> 1.5.0'
# Rails 4.2 => '~> 1.6.0'
# Not needed yet ... Add ability to database table field comments when migrating
#gem 'migration_comments'
# Add settingslogic to App for Global variables
# it's a simple configuration/settings solution that uses an ERB enabled YAML file.
gem 'settingslogic'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use debugger
# gem 'debugger', group: [:development, :test]
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :test do
gem 'rspec-rails' # rails generate rspec:install
gem 'shoulda'
gem 'shoulda-matchers'
gem 'capybara'
#gem 'selenium-webdriver'
gem 'factory_girl_rails'
gem 'database_cleaner'
end
group :development do
gem 'rspec-rails' # rspec in dev so the rake tasks run properly
gem 'factory_girl_rails'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug' # for Ruby 2
# Deploy with Capistrano
# Setting as of 07/2015
gem 'capistrano', '~> 3.1' # , require: false # is using -v 3.4.0
gem 'capistrano-rails', '~> 1.1' # , require: false
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rvm'
gem 'capistrano-file-permissions'
# $ bundle
# $ cap install
end
已添加什麼是在我的Gemfile到我的文章。謝謝。 – Chris