2012-02-03 87 views
3

我很新的Rails和Heroku的activemodel的-3.2.0,但有一個非常簡單的應用程序在本地運行。找不到任何的來源(在Heroku上的Rails 3.2)

我想我會嘗試在Heroku上運行得到的,但可惜我一直運行到同樣的問題。

Could not find activemodel-3.2.0 in any of the sources 

這裏有關於堆棧溢出的相關問題,但他們的任何建議或答案似乎都無法解決這個問題。

試圖回答這個索要的Gemfile,所以這裏的其他帖子是我

source 'https://rubygems.org' 

gem 'rails', '3.2.0' 

group :development, :test do 
    gem 'sqlite3' 
end 
group :production do 
    gem 'pg' 
end 

group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

這裏是我的Gemfile.lock的

GEM 


remote: https://rubygems.org/ 
    specs: 
    actionmailer (3.2.0) 
     actionpack (= 3.2.0) 
     mail (~> 2.4.0) 
    actionpack (3.2.0) 
     activemodel (= 3.2.0) 
     activesupport (= 3.2.0) 
     builder (~> 3.0.0) 
     erubis (~> 2.7.0) 
     journey (~> 1.0.0) 
     rack (~> 1.4.0) 
     rack-cache (~> 1.1) 
     rack-test (~> 0.6.1) 
     sprockets (~> 2.1.2) 
    activemodel (3.2.0) 
     activesupport (= 3.2.0) 
     builder (~> 3.0.0) 
    activerecord (3.2.0) 
     activemodel (= 3.2.0) 
     activesupport (= 3.2.0) 
     arel (~> 3.0.0) 
     tzinfo (~> 0.3.29) 
    activeresource (3.2.0) 
     activemodel (= 3.2.0) 
     activesupport (= 3.2.0) 
    activesupport (3.2.0) 
     i18n (~> 0.6) 
     multi_json (~> 1.0) 
    arel (3.0.0) 
    builder (3.0.0) 
    coffee-rails (3.2.2) 
     coffee-script (>= 2.2.0) 
     railties (~> 3.2.0) 
    coffee-script (2.2.0) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.2.0) 
    erubis (2.7.0) 
    execjs (1.3.0) 
     multi_json (~> 1.0) 
    hike (1.2.1) 
    i18n (0.6.0) 
    journey (1.0.1) 
    jquery-rails (2.0.0) 
     railties (>= 3.2.0.beta, < 5.0) 
     thor (~> 0.14) 
    json (1.6.5) 
    mail (2.4.1) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    mime-types (1.17.2) 
    multi_json (1.0.4) 
    pg (0.12.2) 
    polyglot (0.3.3) 
    rack (1.4.1) 
    rack-cache (1.1) 
     rack (>= 0.4) 
    rack-ssl (1.3.2) 
     rack 
    rack-test (0.6.1) 
     rack (>= 1.0) 
    rails (3.2.0) 
     actionmailer (= 3.2.0) 
     actionpack (= 3.2.0) 
     activerecord (= 3.2.0) 
     activeresource (= 3.2.0) 
     activesupport (= 3.2.0) 
     bundler (~> 1.0) 
     railties (= 3.2.0) 
    railties (3.2.0) 
     actionpack (= 3.2.0) 
     activesupport (= 3.2.0) 
     rack-ssl (~> 1.3.2) 
     rake (>= 0.8.7) 
     rdoc (~> 3.4) 
     thor (~> 0.14.6) 
    rake (0.9.2.2) 
    rdoc (3.12) 
     json (~> 1.4) 
    sass (3.1.12) 
    sass-rails (3.2.4) 
     railties (~> 3.2.0) 
     sass (>= 3.1.10) 
     tilt (~> 1.3) 
    sprockets (2.1.2) 
     hike (~> 1.2) 
     rack (~> 1.0) 
     tilt (~> 1.1, != 1.3.0) 
    sqlite3 (1.3.5) 
    thor (0.14.6) 
    tilt (1.3.3) 
    treetop (1.4.10) 
     polyglot 
     polyglot (>= 0.3.1) 
    tzinfo (0.3.31) 
    uglifier (1.2.3) 
     execjs (>= 0.3.0) 
     multi_json (>= 1.0.2) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    coffee-rails (~> 3.2.1) 
    jquery-rails 
    pg 
    rails (= 3.2.0) 
    sass-rails (~> 3.2.3) 
    sqlite3 
    uglifier (>= 1.0.3) 

這裏有更多的Heroku的日誌

2012-02-03T23:28:53+00:00 app[web.1]: WARNING: Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/activeresource-3.2.0.gemspec' 
2012-02-03T23:28:53+00:00 app[web.1]:  s.add_dependency(%q<activemodel>, ["#<Syck::DefaultKey:0x000000089d28c8> 3.2.0"]) 
2012-02-03T23:28:53+00:00 app[web.1]: end 
2012-02-03T23:28:53+00:00 app[web.1]: end 
2012-02-03T23:28:53+00:00 app[web.1]:  s.add_dependency(%q<activesupport>, ["#<Syck::DefaultKey:0x000000089d3d40> 3.2.0"]) 
2012-02-03T23:28:53+00:00 app[web.1]: else 
2012-02-03T23:28:53+00:00 app[web.1]:  s.add_runtime_dependency(%q<activemodel>, ["#<Syck::DefaultKey:0x000000089d28c8> 3.2.0"]) 
2012-02-03T23:28:53+00:00 app[web.1]: Could not find activemodel-3.2.0 in any of the sources 
2012-02-03T23:28:53+00:00 app[web.1]: !! Unexpected error while processing request: exit 

heroku info --app <my app>

的結果
=== <my app> 
Addons:  Basic Logging, Shared Database 5MB 
Database Size: (empty) 
Dynos:   1 
Git URL:  [email protected]:<my app>.git 
Owner:   [email protected] 
Repo Size:  7M 
Slug Size:  6M 
Stack:   bamboo-mri-1.9.2 
Web URL:  http://<my app>.heroku.com/ 
Workers:  0 

如果任何人有任何好的想法,那簡直太好了。如果你能用超級新手解釋他們,那會更好。謝謝。

+0

也請貼:你'Gemfile.lock',運行'git的status'(應該是乾淨的),結果當你試圖推動的結果,和'Heroku的日誌輸出--app '。 – 2012-02-03 22:58:08

+0

另外,你會得到什麼'heroku info --app '? – 2012-02-03 23:00:09

+0

嘿約翰,謝謝你的迴應。我已經添加了我的Gemfile.lock以及更多的heroku日誌。 'git status'返回'#分支主人 沒有提交(工作目錄乾淨)'和'git push heroku master'返回'一切都是最新的'。 – Chris 2012-02-03 23:30:57

回答

5

你正運行在一個竹堆項目。 Heroku建議您在Cedar堆棧上運行Rails 3.2應用程序,因爲Rails 3.2需要某些更現代的Rubygems和Ruby版本才能正常運行。

您可以降級並使用Rails的3.0.x的系列,而不是,如果你需要對竹出於某種原因。

否則,您可以創建一個新的雪松應用:

heroku create --stack cedar 

,正如你會之前,之後您更新heroku遠程把你的代碼。

+1

謝謝你的幫助約翰。這工作得很好。如果其他人對我來說都是新手,像我一樣,你可以通過手動編輯'.git/config'文件來更新你的heroku遙控器,儘管在終端中可能有這樣做的方法。 – Chris 2012-02-04 10:04:12

+0

你可以用'git remote rm heroku'更新heroku遠程,然後'git remote add heroku ...'。 – 2012-02-04 13:02:52

+0

將現有應用程序遷移到雪松堆棧的指示:https://devcenter.heroku.com/articles/cedar-migration – colllin 2012-04-21 00:01:24

相關問題