2011-08-10 64 views
1

我試圖運行Heroku耙中止?

heroku rake db:migrate 

,但我不斷收到此錯誤

(in /app) 
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY 
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED 
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) 
rake aborted! 
test-unit is not part of the bundle. Add it to Gemfile. 
/usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:102:in `block in cripple_rubygems' 
/app/lib/tasks/rspec.rake:1:in `<top (required)>' 
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `load' 
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `block in load_with_new_constant_marking' 
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' 
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:145:in `load_with_new_constant_marking' 
/app/.bundle/gems/ruby/1.9.1/gems/rails-2.3.8/lib/tasks/rails.rb:14:in `block in <top (required)>' 
/app/.bundle/gems/ruby/1.9.1/gems/rails-2.3.8/lib/tasks/rails.rb:14:in `each' 
/app/.bundle/gems/ruby/1.9.1/gems/rails-2.3.8/lib/tasks/rails.rb:14:in `<top (required)>' 
/app/Rakefile:11:in `require' 

的應用進行了成功推出

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
-----> Configure Rails to log to stdout 
     Installing rails_log_stdout... done 
-----> Gemfile detected, running Bundler version 1.0.7 
     All dependencies are satisfied 
-----> Compiled slug size is 14.3MB 
-----> Launching... done, v7 
     http://young-robot-995.heroku.com deployed to Heroku 

但我得到這個錯誤

在我的本地開發,它看起來像我使用紅寶石1.8,但他的Roku公司,它看起來像它的1.9.1也許這就是導致它....就如何解決這個

這裏的任何想法是我的Gemfile是否會幫助

source 'http://rubygems.org' 

#gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3' 
gem 'rails', '2.3.8' 
gem 'will_paginate', '2.3.12' 
gem 'googlecharts' 
gem 'faker' 
gem 'httparty' 
gem 'bandsintown' 
gem 'itunes-search-api','0.1.0', :path => 'vendor/gems/itunes-search-api-0.1.0' 
gem 'i18n', '0.4.2' 
gem "giggly", "~> 0.1.2" 
gem "ruby-paypal",'0.0.5', :path => 'vendor/gems/ruby-paypal-0.0.5' 


group :development, :test do 
    gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3' 
end 
+0

我知道Heroku的要求postgress寶石這麼加'寶石pg'您的Gemfile或遷移將無法正常工作。此外,它看起來像你需要'test-unit' gem這樣安裝,看看你是否繼續得到相同的蹤跡。 – austinbv

+0

我正在使用sqllite而不是postgress,儘管....我還是需要它 – Trace

+0

Heroku使用postgres – austinbv

回答

3

看起來像您需要修改您的Gemfile ,請嘗試使用下面的一個,看看是否適合你:

source 'http://rubygems.org' 

gem 'rails', '2.3.8' 
gem 'will_paginate', '2.3.12' 
gem 'googlecharts' 
gem 'faker' 
gem 'httparty' 
gem 'bandsintown' 
gem 'itunes-search-api','0.1.0', :path => 'vendor/gems/itunes-search-api-0.1.0' 
gem 'i18n', '0.4.2' 
gem "giggly", "~> 0.1.2" 
gem "ruby-paypal",'0.0.5', :path => 'vendor/gems/ruby-paypal-0.0.5' 

group :production do 
    gem 'test-unit' 
    gem 'pg' 
end 


group :development, :test do 
    gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3' 
end 
+0

似乎是合乎邏輯的,但我得到的軟件包安裝時出現此錯誤使用googlecharts(1.6.7) 從供應商處使用itunes-search-api(0.1.0)/ gems/itunes-search-api-0.1.0 安裝pg (0.11.0)本地擴展/Library/Ruby/Site/1.8/rubygems/installer.rb:551:in'build_extensions':錯誤:無法構建gem本機擴展。 (Gem :: Installer :: ExtensionBuildError) – Trace

+2

運行bundle install時,將其作爲bundle install運行 - 不生產。每次在本地捆綁時都需要這樣做,以避免安裝postgre SQL。如果你在linux上,我會建議製作一個別名或別的東西。 –

+0

哎呀!忘了提到這一點,謝謝Thariq。 –