2010-07-09 91 views
1

所以我對此感到茫然。我的錯誤是:在dreamhost問題上部署Rails應用程序

缺少這些所需的寶石:jrails您正在運行:ruby 1.8.7.72 at /usr/bin/ruby1.8 ruby​​gems 1.3.6 at /home/ryann/.gem/ruby/1.8,/ usr/lib/ruby​​/gems/1.8運行rake gems:install安裝缺失的寶石。

我在我的供應商目錄中解壓JARIL並凍結了我的本地導軌環境。一切工作正常我的本地機器上。

我在我的environment.rb文件中使用了config.gem'jrails'。

我的軌跡(遺憾的混亂):

0 /home/ryann/intercomhq.com/releases/20100709162648/vendor/rails/railties/lib/initializer.rb 336 in `abort' 
1 /home/ryann/intercomhq.com/releases/20100709162648/vendor/rails/railties/lib/initializer.rb 336 in `check_gem_dependencies' 
2 /home/ryann/intercomhq.com/releases/20100709162648/vendor/rails/railties/lib/initializer.rb 170 in `process' 
3 /home/ryann/intercomhq.com/releases/20100709162648/vendor/rails/railties/lib/initializer.rb 113 in `send' 
4 /home/ryann/intercomhq.com/releases/20100709162648/vendor/rails/railties/lib/initializer.rb 113 in `run' 
5 /home/ryann/intercomhq.com/releases/20100709162648/config/environment.rb 20 
6 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require' 
7 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require' 
8 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 299 in `preload_application' 
9 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 248 in `initialize_server' 
10 /dh/passenger/lib/phusion_passenger/utils.rb 255 in `report_app_init_status' 
11 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 233 in `initialize_server' 
12 /dh/passenger/lib/phusion_passenger/abstract_server.rb 194 in `start_synchronously' 
13 /dh/passenger/lib/phusion_passenger/abstract_server.rb 163 in `start' 
14 /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb 209 in `start' 
15 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 262 in `spawn_rails_application' 
16 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb 126 in `lookup_or_add' 
17 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 256 in `spawn_rails_application' 
18 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb 80 in `synchronize' 
19 /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' 
20 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 255 in `spawn_rails_application' 
21 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 154 in `spawn_application' 
22 /dh/passenger/lib/phusion_passenger/spawn_manager.rb 287 in `handle_spawn_application' 
23 /dh/passenger/lib/phusion_passenger/abstract_server.rb 352 in `__send__' 
24 /dh/passenger/lib/phusion_passenger/abstract_server.rb 352 in `main_loop' 
25 /dh/passenger/lib/phusion_passenger/abstract_server.rb 196 in `start_synchronously' 
26 /dh/passenger/bin/passenger-spawn-server 61 

任何人有,爲什麼我仍然缺少一個寶石當我解開它的任何想法?

+0

,您可以使用編輯器(圖片與零和一)「代碼示例」選項使堆棧跟蹤看起來很可觀。 – 2010-07-09 16:54:23

+0

感謝您的提示...我會記住我的下一個問題:) – Ryan 2010-07-09 20:15:47

回答

1

問題在於共享主機。在那裏你通常只有你的所有用戶和本地主目錄中都有通用的寶石庫。該問題可以通過在你的配置/ preinitializer.rb或到config/environment.rb

ENV['GEM_PATH'] = '/home/[username]/ruby/gems:/usr/lib/ruby/gems/1.8' 
Gem.clear_paths 

指定正確的路徑來解決這是我的主機路徑結構,則可能需要更新它爲您的。

編輯
經過我的消息來源,你可能還需要這些行之前補充一點:BTW

require 'rubygems' 
require 'rubygems/gem_runner' 
+0

不行我得到了同樣的錯誤信息。我仔細檢查了我從dreamhost的路徑和所有檢查。但是,它仍然在我的.gem文件夾中查看,如果我瀏覽到該文件夾​​,則沒有任何內容。它不應該看我的供應商文件夾? – Ryan 2010-07-09 21:41:11

+0

所以這是一個事物的組合。 首先,我必須按照指示在這個論壇 http://forums.site5.com/showthread.php?p=87539 然後我說我GEM_PATH我的environment.rb 一切都顯得加工。 謝謝。 – Ryan 2010-07-09 22:21:43