Проблема с развертыванием Gem в Rails Heroku

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. Кто-нибудь знает что это значит? Я попробовал Google и попытался создать файл .gem, и вот мой файл .gem выглядит так:

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

Когда я запускаю rake gems: refresh_specs, я получаю эту ошибку:

littleman@littleman-laptop:~/Desktop/employee_tracker$ rake gems:refresh_specs
(in /home/littleman/Desktop/employee_tracker)
rake aborted!
undefined method `installed_source_index' for #
/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 '
/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 '
/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 `
'

Это то, что я получаю при развертывании на heroku .

littleman@littleman-laptop:~/Desktop/employee_tracker$ git add .
littleman@littleman-laptop:~/Desktop/employee_tracker$ git commit -m "little"
[master 609c8ca] little
 9 files changed, 1026 insertions(+), 229 deletions(-)
 create mode 100755 .gems.save
littleman@littleman-laptop:~/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 git@heroku.com:morning-river-39.git
   168d74d..609c8ca  master -> master

Если вы перейдете на сайт , появится сообщение об ошибке. Затем, когда я смотрю журналы, я вижу это.

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 / gems:

littleman@littleman-laptop:~/Desktop/employee_tracker$ git add -u . && git commit -am "removing vendored gems"
[master 76ec772] removing vendored gems
 2 files changed, 214 insertions(+), 255 deletions(-)
littleman@littleman-laptop:~/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 git@heroku.com:morning-river-39.git
   ef97eef..76ec772  master -> master
littleman@littleman-laptop:~/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.

Кто нибудь может помочь? Заранее благодарим вас и очень признательны.

РЕШЕНИЕ РЕШЕНИЕ:

После всего вышеперечисленного я добавил следующую строку кода в .gems, затем heroku rake db: migrate rails --version 2.3.8.

Еще раз спасибо за помощь.

1
задан RoR 7 September 2010 в 23:12
поделиться