Rails 4.1.5,capistrano 3尝试部署到ubuntu。
在部署时收到以下错误:
Gem::LoadError: mysql2 is not part of the bundle. Add it to Gemfile.
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile
但是mysql2在Gemfile中。我已经尝试删除shared / bundle目录以强制重做gem installs,但是没有修复。
这里发生了什么?为什么它没有在Gemfile中看到mysql2?
的Gemfile:
source 'http://rubygems.org'
gem 'rails', '4.1.5'
gem 'mysql2'
gem 'dynamic_form'
gem 'coffeebeans'
gem 'friendly_id', '5.0.3'
gem 'dumper'
gem 'sass-rails', " ~> 4.0.2"
gem 'coffee-rails', "~> 4.0.0"
gem 'uglifier', '>= 1.3.0'
gem 'jquery-ui-rails'
gem 'jquery-rails'
gem 'jquery-validation-rails'
gem 'bcrypt-ruby', '~> 3.1.2'
gem 'paperclip', '4.1.1'
gem 'slim'
gem 'slim-rails'
gem 'prawn'
gem 'prawn-table', '0.1.0'
gem 'axlsx_rails'
gem 'dalli'
gem 'simple_form', '~> 3.0.2'
gem 'redcarpet'
gem 'i18n-active_record',
:git => 'git://github.com/svenfuchs/i18n-active_record.git',
:require => 'i18n/active_record'
group :test, :development do
gem 'launchy'
gem 'capybara-webkit'
gem 'rspec-rails'
gem 'factory_girl_rails', '~> 4.0'
gem 'thin'
end
group :development do
gem 'rack-mini-profiler'
gem 'powder'
gem 'letter_opener'
gem 'hirb'
gem 'capistrano-rails', '~> 1.1', require: false
gem 'capistrano-bundler', '~> 1.1', require: false
gem 'capistrano-rbenv'
gem 'spring'
gem 'spring-commands-rspec'
gem 'spring-commands-testunit'
end
group :test do
gem 'minitest'
gem 'minitest-reporters'
gem 'capybara'
gem 'poltergeist'
gem 'database_cleaner', '1.2'
gem 'mocha'
gem 'faker'
end
Gemfile.lock的:
GIT
remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
specs:
i18n-active_record (0.0.2)
i18n (>= 0.5.0)
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.1.5)
actionpack (= 4.1.5)
actionview (= 4.1.5)
mail (~> 2.5.4)
actionpack (4.1.5)
actionview (= 4.1.5)
activesupport (= 4.1.5)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.5)
activesupport (= 4.1.5)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.5)
activesupport (= 4.1.5)
builder (~> 3.1)
activerecord (4.1.5)
activemodel (= 4.1.5)
activesupport (= 4.1.5)
arel (~> 5.0.0)
activesupport (4.1.5)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.3.6)
ansi (1.4.3)
arel (5.0.1.20140414130214)
axlsx (2.0.1)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.0.0)
axlsx_rails (0.2.1)
axlsx (>= 2.0.1)
rails (>= 3.1)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
builder (3.2.2)
capistrano (3.2.1)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.3)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-rails (1.1.2)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rbenv (2.0.2)
capistrano (~> 3.1)
sshkit (~> 1.3)
capybara (2.4.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-webkit (1.3.0)
capybara (>= 2.0.2, < 2.5.0)
json
climate_control (0.0.3)
activesupport (>= 3.0)
cliver (0.3.2)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
coffeebeans (1.0.1)
actionpack (>= 3.0.0)
coffee-script
colorize (0.7.3)
daemons (1.1.9)
dalli (2.7.2)
database_cleaner (1.2.0)
diff-lcs (1.2.5)
dumper (1.6.0)
multi_json (>= 1.0)
multipart-post (>= 1.1.5)
posix-spawn (>= 0.3.6)
dynamic_form (1.1.4)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.2.1)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
faker (1.4.3)
i18n (~> 0.5)
friendly_id (5.0.3)
activerecord (>= 4.0.0)
hike (1.2.3)
hirb (0.7.2)
htmlentities (4.3.2)
i18n (0.6.11)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.0)
railties (>= 3.2.16)
jquery-validation-rails (1.12.0)
railties (>= 3.2, < 5.0)
thor (~> 0.14)
json (1.8.1)
launchy (2.4.2)
addressable (~> 2.3)
letter_opener (1.2.0)
launchy (~> 2.2)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.4)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (5.4.1)
minitest-reporters (1.0.5)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.10.1)
multipart-post (2.0.0)
mysql2 (0.3.16)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
paperclip (4.1.1)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
mime-types
pdf-core (0.2.5)
poltergeist (1.5.1)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
posix-spawn (0.3.9)
powder (0.2.1)
thor (>= 0.11.5)
prawn (1.2.1)
pdf-core (~> 0.2.5)
ttfunk (~> 1.2.0)
prawn-table (0.1.0)
rack (1.5.2)
rack-mini-profiler (0.9.2)
rack (>= 1.1.3)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.5)
actionmailer (= 4.1.5)
actionpack (= 4.1.5)
actionview (= 4.1.5)
activemodel (= 4.1.5)
activerecord (= 4.1.5)
activesupport (= 4.1.5)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.5)
sprockets-rails (~> 2.0)
railties (4.1.5)
actionpack (= 4.1.5)
activesupport (= 4.1.5)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
redcarpet (3.1.2)
rspec-core (3.1.2)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.0)
rspec-support (~> 3.1.0)
rspec-rails (3.1.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.0)
ruby-progressbar (1.5.1)
rubyzip (1.0.0)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
simple_form (3.0.2)
actionpack (~> 4.0)
activemodel (~> 4.0)
slim (2.0.3)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
slim-rails (2.1.5)
actionpack (>= 3.0, < 4.2)
activesupport (>= 3.0, < 4.2)
railties (>= 3.0, < 4.2)
slim (~> 2.0)
spring (1.1.3)
spring-commands-rspec (1.0.2)
spring (>= 0.9.1)
spring-commands-testunit (1.0.1)
spring (>= 0.9.1)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sshkit (1.5.1)
colorize
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.6.8)
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
ttfunk (1.2.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
websocket-driver (0.3.4)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
axlsx_rails
bcrypt-ruby (~> 3.1.2)
capistrano-bundler (~> 1.1)
capistrano-rails (~> 1.1)
capistrano-rbenv
capybara
capybara-webkit
coffee-rails (~> 4.0.0)
coffeebeans
dalli
database_cleaner (= 1.2)
dumper
dynamic_form
factory_girl_rails (~> 4.0)
faker
friendly_id (= 5.0.3)
hirb
i18n-active_record!
jquery-rails
jquery-ui-rails
jquery-validation-rails
launchy
letter_opener
minitest
minitest-reporters
mocha
mysql2
paperclip (= 4.1.1)
poltergeist
powder
prawn
prawn-table (= 0.1.0)
rack-mini-profiler
rails (= 4.1.5)
redcarpet
rspec-rails
sass-rails (~> 4.0.2)
simple_form (~> 3.0.2)
slim
slim-rails
spring
spring-commands-rspec
spring-commands-testunit
thin
uglifier (>= 1.3.0)