Rails 3.0、ruby 1.9.2、rbenv、および Ubuntu の google-api-client gem に問題があります。ローカル環境では魅力的に動作しますが、capistrano を使用して統合環境にデプロイすると、google/api_client が必要なときに失敗します
GemFile には次のものがあります。
gem 'google-api-client', '~> 0.4.3', :require => 'google/api_client'
GemFile.lock で:
google-api-client (0.4.3)
addressable (>= 2.2.3)
autoparse (>= 0.3.1)
extlib (>= 0.9.15)
faraday (~> 0.7.0)
launchy (>= 2.0.0)
multi_json (>= 1.0.0)
signet (>= 0.3.1)
しかし、コマンドラインで:
gem which google-api-client
ERROR: Can't find ruby library file or shared library google-api-client
バンドラーでgemをインストールしました
エラーの完全なトレースは次のとおりです。
no such file to load -- google/api_client
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `block in require'
activesupport (3.0.19) lib/active_support/dependencies.rb:227:in `load_dependency'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
lib/snrengine/searcher/google_searcher.rb:1:in `<top (required)>'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `block in require'
activesupport (3.0.19) lib/active_support/dependencies.rb:227:in `load_dependency'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
lib/snr_engine.rb:5:in `<top (required)>'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `block in require'
activesupport (3.0.19) lib/active_support/dependencies.rb:227:in `load_dependency'
activesupport (3.0.19) lib/active_support/dependencies.rb:242:in `require'
activesupport (3.0.19) lib/active_support/dependencies.rb:350:in `require_or_load'
activesupport (3.0.19) lib/active_support/dependencies.rb:491:in `load_missing_constant'
activesupport (3.0.19) lib/active_support/dependencies.rb:183:in `block in const_missing'
activesupport (3.0.19) lib/active_support/dependencies.rb:181:in `each'
activesupport (3.0.19) lib/active_support/dependencies.rb:181:in `const_missing'
activesupport (3.0.19) lib/active_support/dependencies.rb:503:in `load_missing_constant'
activesupport (3.0.19) lib/active_support/dependencies.rb:183:in `block in const_missing'
activesupport (3.0.19) lib/active_support/dependencies.rb:181:in `each'
activesupport (3.0.19) lib/active_support/dependencies.rb:181:in `const_missing'
app/models/social_network_recommender.rb:52:in `search_in_social_networks'
app/controllers/company/searches_controller.rb:31:in `social_network_search'
actionpack (3.0.19) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.0.19) lib/abstract_controller/base.rb:150:in `process_action'
actionpack (3.0.19) lib/action_controller/metal/rendering.rb:11:in `process_action'
actionpack (3.0.19) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.0.19) lib/active_support/callbacks.rb:461:in `_run__587315471593137746__process_action__3569589993426311357__callbacks'
activesupport (3.0.19) lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
activesupport (3.0.19) lib/active_support/callbacks.rb:94:in `run_callbacks'
actionpack (3.0.19) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.0.19) lib/action_controller/metal/rescue.rb:17:in `process_action'
actionpack (3.0.19) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.0.19) lib/active_support/notifications.rb:52:in `block in instrument'
activesupport (3.0.19) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.0.19) lib/active_support/notifications.rb:52:in `instrument'
actionpack (3.0.19) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.0.19) lib/abstract_controller/base.rb:119:in `process'
actionpack (3.0.19) lib/abstract_controller/rendering.rb:41:in `process'
actionpack (3.0.19) lib/action_controller/metal.rb:138:in `dispatch'
actionpack (3.0.19) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.0.19) lib/action_controller/metal.rb:178:in `block in action'
actionpack (3.0.19) lib/action_dispatch/routing/route_set.rb:68:in `call'
actionpack (3.0.19) lib/action_dispatch/routing/route_set.rb:68:in `dispatch'
actionpack (3.0.19) lib/action_dispatch/routing/route_set.rb:33:in `call'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:in `block in call'
routing-filter (0.2.3) lib/routing_filter/adapters/rails_3.rb:74:in `call'
routing-filter (0.2.3) lib/routing_filter/adapters/rails_3.rb:74:in `recognize_with_filtering'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in `call'
actionpack (3.0.19) lib/action_dispatch/routing/route_set.rb:499:in `call'
oa-core (0.3.0) lib/omniauth/strategy.rb:44:in `call!'
oa-core (0.3.0) lib/omniauth/strategy.rb:30:in `call'
oa-core (0.3.0) lib/omniauth/strategy.rb:44:in `call!'
oa-core (0.3.0) lib/omniauth/strategy.rb:30:in `call'
vendor/plugins/bacchanalytics/lib/bacchanalytics.rb:64:in `call'
exception_notification (2.5.2) lib/exception_notifier.rb:25:in `call'
warden (1.0.6) lib/warden/manager.rb:35:in `block in call'
warden (1.0.6) lib/warden/manager.rb:34:in `catch'
warden (1.0.6) lib/warden/manager.rb:34:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.6) lib/rack/methodoverride.rb:24:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/flash.rb:182:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/cookies.rb:302:in `call'
activerecord (3.0.19) lib/active_record/query_cache.rb:32:in `block in call'
activerecord (3.0.19) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
activerecord (3.0.19) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.19) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.19) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
activesupport (3.0.19) lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
actionpack (3.0.19) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.6) lib/rack/sendfile.rb:106:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.19) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.0.19) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.6) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.19) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.6) lib/rack/lock.rb:13:in `block in call'
<internal:prelude>:10:in `synchronize'
rack (1.2.6) lib/rack/lock.rb:13:in `call'
railties (3.0.19) lib/rails/application.rb:168:in `call'
railties (3.0.19) lib/rails/application.rb:77:in `method_missing'
unicorn (4.2.1) lib/unicorn/http_server.rb:530:in `process_client'
unicorn (4.2.1) lib/unicorn/http_server.rb:604:in `worker_loop'
unicorn (4.2.1) lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
unicorn (4.2.1) lib/unicorn/http_server.rb:498:in `maintain_worker_count'
unicorn (4.2.1) lib/unicorn/http_server.rb:272:in `join'
unicorn (4.2.1) bin/unicorn:121:in `<top (required)>'
/home/jobssy-dev/app/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
/home/jobssy-dev/app/shared/bundle/ruby/1.9.1/bin/unicorn:19:in `<main>'
依存関係の問題のようですが、開発環境で実行されるため意味がありません