2010-09-07 177 views
1
config.gem: Unpacked gem authlogic-2.1.5 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
config.gem: Unpacked gem authlogic-2.1.6 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
/disk1/home/slugs/283271_2d484fd_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': RubyGem version error: rack(1.0.1 not ~> 1.1.0) (RuntimeError) 

上面从Heroku日志。有人知道这是什么意思?我试图谷歌,并试图产生.gem文件,这是我的.gem文件看起来像这样:Rails Heroku Gem部署问题

authlogic --version 2.1.6 
acl9 --version ">=0.12.0" --source http://gemcutter.org 
rack --version 1.0.1 

当我运行耙宝石:refresh_specs我得到这个错误:

[email protected]:~/Desktop/employee_tracker$ rake gems:refresh_specs 
(in /home/littleman/Desktop/employee_tracker) 
rake aborted! 
undefined method `installed_source_index' for #<Gem::SourceIndex:0x00000000bba328> 
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/rails/gem_dependency.rb:224:in `refresh' 
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/tasks/gems.rake:53:in `block (3 levels) in <top (required)>' 
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/tasks/gems.rake:53:in `each' 
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/tasks/gems.rake:53:in `block (2 levels) in <top (required)>' 
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `call' 
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `block in execute' 
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `each' 
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute' 
/usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain' 
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
/usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain' 
/usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke' 
/usr/local/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task' 
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level' 
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `each' 
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level' 
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling' 
/usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level' 
/usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run' 
/usr/local/bin/rake:31:in `<main>' 

这是我从部署到heroku所获得的结果。

[email protected]:~/Desktop/employee_tracker$ git add . 
[email protected]:~/Desktop/employee_tracker$ git commit -m "little" 
[master 609c8ca] little 
9 files changed, 1026 insertions(+), 229 deletions(-) 
create mode 100755 .gems.save 
[email protected]:~/Desktop/employee_tracker$ git push heroku master 
Counting objects: 26, done. 
Compressing objects: 100% (14/14), done. 
Writing objects: 100% (14/14), 7.95 KiB, done. 
Total 14 (delta 9), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Rails app detected 

-----> Installing gem authlogic 2.1.6 from http://rubygems.org 
     Successfully installed activesupport-3.0.0 
     Successfully installed authlogic-2.1.6 
     2 gems installed 

-----> Installing gem acl9 >=0.12.0 from http://gemcutter.org, http://rubygems.org 
     Successfully installed acl9-0.12.0 
     1 gem installed 

     Compiled slug size is 5.1MB 
-----> Launching.... done 
     http://morning-river-39.heroku.com deployed to Heroku 

To [email protected]:morning-river-39.git 
    168d74d..609c8ca master -> master 

如果你去site,它会说错误。然后当我看到日志时,我看到了这一点。

config.gem: Unpacked gem authlogic-2.1.5 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
config.gem: Unpacked gem authlogic-2.1.6 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
/disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': RubyGem version error: rack(1.0.1 not ~> 1.1.0) (RuntimeError) 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/environment.rb:9 
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize' 
    from /home/heroku_rack/heroku.ru:31:in `new' 
    from /home/heroku_rack/heroku.ru:31 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `new' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `map' 
    from /home/heroku_rack/heroku.ru:20 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /home/heroku_rack/heroku.ru:13:in `new' 
    from /home/heroku_rack/heroku.ru:13 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /home/heroku_rack/heroku.ru:1:in `new' 
    from /home/heroku_rack/heroku.ru:1 

==> dyno-2135693.log (crash) <== 
config.gem: Unpacked gem authlogic-2.1.5 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
config.gem: Unpacked gem authlogic-2.1.6 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 
/disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': RubyGem version error: rack(1.0.1 not ~> 1.1.0) (RuntimeError) 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run' 
    from /disk1/home/slugs/283271_609c8ca_a21d/mnt/config/environment.rb:9 
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize' 
    from /home/heroku_rack/heroku.ru:31:in `new' 
    from /home/heroku_rack/heroku.ru:31 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `new' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:46:in `map' 
    from /home/heroku_rack/heroku.ru:20 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /home/heroku_rack/heroku.ru:13:in `new' 
    from /home/heroku_rack/heroku.ru:13 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
    from /home/heroku_rack/heroku.ru:1:in `new' 
    from /home/heroku_rack/heroku.ru:1 

-----> An error happened during the initialization of your app. 

     This may be due to a typo, wrong number of arguments, or calling a 
     function that doesn't exist. 

     Make sure the app is working locally in production mode, by running it 
     with RAILS_ENV (for Rails apps) or RACK_ENV (for Sinatra or other rack 
     apps) set to production. e.g. RAILS_ENV=production script/server. 

     Examine the backtrace above this message to debug. 

删除vendored /宝石后:

[email protected]:~/Desktop/employee_tracker$ git add -u . && git commit -am "removing vendored gems" 
[master 76ec772] removing vendored gems 
2 files changed, 214 insertions(+), 255 deletions(-) 
[email protected]:~/Desktop/employee_tracker$ git push heroku master 
Counting objects: 13, done. 
Compressing objects: 100% (6/6), done. 
Writing objects: 100% (7/7), 4.84 KiB, done. 
Total 7 (delta 4), 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. 
     Compiled slug size is 1.1MB 
-----> Launching.... done 
     http://morning-river-39.heroku.com deployed to Heroku 

To [email protected]:morning-river-39.git 
    ef97eef..76ec772 master -> master 
[email protected]:~/Desktop/employee_tracker$ heroku logs 

==> dyno-2135693.log (crash) <== 
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. 

-----> Rails can't find the expected version. 

     Check to ensure you have specified the correct version of Rails in your 
     Gemfile or .gems. See http://docs.heroku.com/gems for details. 

     For Rails 2.3.5 or older, you may be affected by a Rails dependency 
     issue. See http://docs.heroku.com/rails236 for details. 

     Examine the backtrace above this message to debug. 

谁能帮助?预先感谢您,非常感谢。

SOLUTION解决:

所有上述的后,我增加了下面的代码行.gems然后Heroku的耙分贝:迁移 导轨--version 2.3.8。

再次感谢您的帮助。

+1

响应您的解决方案,不要忘了加* * pg ** gem也包含在你的.gems文件中,否则当你在后来搜索数据库时会遇到问题 – stephenmurdoch 2010-09-07 23:29:23

+0

非常感谢。 – RoR 2010-09-08 00:37:58

回答

1

错误消息提到,你的宝石被包装成供应商/宝石夹

config.gem: Unpacked gem authlogic-2.1.5 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. 

你有没有事先vendored他们自己推 - 我从来没有记得的Heroku这样做对我的任何应用程序。

如果你自己已经vendored他们,你能尝试删除你的供应商/宝石夹,然后推前做git add -u . && git commit -am "removing vendored gems" ...

+0

似乎越来越接近。我已经发布了我在接下来的顶部帖子中遇到的问题。再次感谢。 – RoR 2010-09-07 23:06:23

+0

ahh将这个添加到.gems第一行的“rails --version 2.3.8”,这是第二个'pg' – stephenmurdoch 2010-09-07 23:10:56

+1

谢谢你得到它的工作 – RoR 2010-09-07 23:11:23

1

您想要更改的一件事是删除.gems文件中“机架”版本的语句。 Heroku默认会照顾它。

至于authlogic你尝试运行refresh_specs,不知道这是否会有任何问题。

这是一个Rails 3应用程序吗? 。如果是http://docs.heroku.com/rails3则将这些用作指令。你必须在heroku中使用竹堆而不是普通的竹堆。

+0

我从文件中删除机架,并尝试refresh_specs,我得到这个错误: – RoR 2010-09-07 22:03:39

+0

在heroku上运行它..在此之前..你尝试推送到heroku,看看它是否工作,没有刷新规格 – 2010-09-07 22:08:41

+0

是的,我没有git push英雄大师。推得很好。 – RoR 2010-09-07 22:13:05