2010-11-29 35 views
1

這是我的GemfileRuby on Rails:Heroku:如何安裝我的寶石?

source :rubygems 
gem 'rails', '2.3.8' 
gem 'authlogic', '2.1.6' 
gem 'addresslogic', '1.2.1' 
gem 'searchlogic', '2.4.19' 
gem 'subdomain-fu', '0.5.4' 

,但是,當我運行在Heroku上的應用程序,我碰到一個「應用程序死機」

和日誌說,我只安裝了軌道,我需要的非軌道上面列出的寶石。

我在做什麼錯?

輸出Heroku的推

 % git push heroku master 
Counting objects: 10, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (6/6), done. 
Writing objects: 100% (6/6), 860 bytes, done. 
Total 6 (delta 3), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Rails app detected 
-----> WARNING: Detected Rails is not declared in either .gems or Gemfile 
     Scheduling the install of Rails 2.3.8. 
     See http://docs.heroku.com/gems for details on specifying gems. 

-----> Installing gem rails 2.3.8 from http://rubygems.org 
     Successfully installed activesupport-2.3.8 
     Successfully installed activerecord-2.3.8 
     Successfully installed rack-1.1.0 
     Successfully installed actionpack-2.3.8 
     Successfully installed actionmailer-2.3.8 
     Successfully installed activeresource-2.3.8 
     Successfully installed rails-2.3.8 
     7 gems installed 

     Compiled slug size is 11.7MB 
-----> Launching.... done 
     http://%%%%%%%%%%%%%%%%%%%.heroku.com deployed to Heroku 

To [email protected]%%%%%%%%%%%%%%%%%%%.git 
    3ac597d..b849480 master -> master 

Heroku的日誌

==> dyno-3334279.log <== 
Missing these required gems: 
    authlogic 
    addresslogic 
    searchlogic 

You're running: 
    ruby 1.8.7.253 at /usr/ruby1.8.7/bin/ruby 
    rubygems 1.3.7 at /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.bundle/gems/ruby/1.8, /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.bundle/gems, /home/slugs/362612_b849480_24ac-7763f7d7-8c04-478b-ab13-af81efd3e8c2/mnt/.gems, /usr/ruby1.8.7/lib/ruby/gems/1.8 

Run `rake gems:install` to install the missing gems. 

==> production.log <== 
# Logfile created on Sun Nov 28 19:41:39 -0800 2010 
+0

你使用Rails 3和Bamboo堆棧(最近做了默認)嗎?查看推送到Heroku的控制檯輸出以及日誌文件的實際輸出也很有幫助。 – Matchu 2010-11-29 03:49:56

+0

會做。很快發佈。 – NullVoxPopuli 2010-11-29 03:52:26

+0

那麼...我想用2.3.8。對竹子一無所知 – NullVoxPopuli 2010-11-29 03:57:15

回答

3

如果你有一個名爲Gemfile一個文件(在這種情況下,準確/拼寫),Heroku將使用這個文件來確定所有要安裝的gem。

你提到,你有一個GemFile - 如果是這樣的文件名是在你的倉庫套管的方式,Heroku的可能把它撿起來。

0

你應該創建一個文件在您的應用程序根稱爲.gems。該文件應包含你所需要的寶石的列表,用於定義gem依賴的語法是這樣的:

rails --version 2.3.8 
authlogic --version 2.1.6 

等等