heroku、thinrack 1.1.0、gemfile 需要rack 1.0.1

发布于 2024-11-23 20:39:03 字数 2396 浏览 4 评论 0原文

我的 ror 应用程序在 Rails 2.3.5 上运行(需要机架 1.0.1), 在heroku上的thin默认激活rack 1.1.0

并抛出错误:

    " You have already activated rack 1.1.0, but your Gemfile requires rack 1.0.1. Consider using bundle exec."

    my Gemfile:

source 'http://rubygems.org'


group :test, :development do
  gem "rack","1.0.1"
end

gem "rails","2.3.5"
gem "mysql"
gem "rake", "0.8.3"
gem "declarative_authorization", "0.5.2"
gem "searchlogic"
gem "prawn", "0.6.3"
gem "thin","1.2.11"

group :test, :development do
  gem "rack","1.0.1"
end


group :development do
  # bundler requires these gems in development
  # gem "rails-footnotes"
end

group :test do
  # bundler requires these gems while running tests
  # gem "rspec"
  # gem "faker"
end
----------------------

我安装了bundler并开发了Gemfile.lock:

    GEM
      remote: http://rubygems.org/
      specs:
        actionmailer (2.3.5)

          actionpack (= 2.3.5)
        actionpack (2.3.5)
          activesupport (= 2.3.5)
          rack (~> 1.0.0)
        activerecord (2.3.5)
          activesupport (= 2.3.5)
        activeresource (2.3.5)
          activesupport (= 2.3.5)
        activesupport (2.3.5)
        daemons (1.1.4)
        declarative_authorization (0.5.2)
        eventmachine (0.12.10)
        mysql (2.8.1)
        prawn (0.6.3)
          prawn-core (>= 0.6.3, < 0.7)
          prawn-format (>= 0.2.3, < 0.3)
          prawn-layout (>= 0.3.2, < 0.4)
          prawn-security (>= 0.1.1, < 0.2)
        prawn-core (0.6.3)
        prawn-format (0.2.3)
          prawn-core
        prawn-layout (0.3.2)
        prawn-security (0.1.1)
        rack (1.0.1)
        rails (2.3.5)
          actionmailer (= 2.3.5)
          actionpack (= 2.3.5)
          activerecord (= 2.3.5)
          activeresource (= 2.3.5)
          activesupport (= 2.3.5)
          rake (>= 0.8.3)
        rake (0.8.3)
        searchlogic (2.4.28)
          activerecord (>= 2.0.0)
        thin (1.2.11)
          daemons (>= 1.0.9)
          eventmachine (>= 0.12.6)
          rack (>= 1.0.0)

    PLATFORMS
      ruby

    DEPENDENCIES
      declarative_authorization (= 0.5.2)
      mysql
      prawn (= 0.6.3)
      rack (= 1.0.1)
      rails (= 2.3.5)
      rake (= 0.8.3)
      searchlogic
      thin (= 1.2.11)
    ---------------------------

请帮我将其部署在heroku上........

My ror app runs on rails 2.3.5(which requires rack 1.0.1),
thin on heroku activates rack 1.1.0 by default

and throws error:

    " You have already activated rack 1.1.0, but your Gemfile requires rack 1.0.1. Consider using bundle exec."

    my Gemfile:

source 'http://rubygems.org'


group :test, :development do
  gem "rack","1.0.1"
end

gem "rails","2.3.5"
gem "mysql"
gem "rake", "0.8.3"
gem "declarative_authorization", "0.5.2"
gem "searchlogic"
gem "prawn", "0.6.3"
gem "thin","1.2.11"

group :test, :development do
  gem "rack","1.0.1"
end


group :development do
  # bundler requires these gems in development
  # gem "rails-footnotes"
end

group :test do
  # bundler requires these gems while running tests
  # gem "rspec"
  # gem "faker"
end
----------------------

I installed bundler and developed Gemfile.lock :

    GEM
      remote: http://rubygems.org/
      specs:
        actionmailer (2.3.5)

          actionpack (= 2.3.5)
        actionpack (2.3.5)
          activesupport (= 2.3.5)
          rack (~> 1.0.0)
        activerecord (2.3.5)
          activesupport (= 2.3.5)
        activeresource (2.3.5)
          activesupport (= 2.3.5)
        activesupport (2.3.5)
        daemons (1.1.4)
        declarative_authorization (0.5.2)
        eventmachine (0.12.10)
        mysql (2.8.1)
        prawn (0.6.3)
          prawn-core (>= 0.6.3, < 0.7)
          prawn-format (>= 0.2.3, < 0.3)
          prawn-layout (>= 0.3.2, < 0.4)
          prawn-security (>= 0.1.1, < 0.2)
        prawn-core (0.6.3)
        prawn-format (0.2.3)
          prawn-core
        prawn-layout (0.3.2)
        prawn-security (0.1.1)
        rack (1.0.1)
        rails (2.3.5)
          actionmailer (= 2.3.5)
          actionpack (= 2.3.5)
          activerecord (= 2.3.5)
          activeresource (= 2.3.5)
          activesupport (= 2.3.5)
          rake (>= 0.8.3)
        rake (0.8.3)
        searchlogic (2.4.28)
          activerecord (>= 2.0.0)
        thin (1.2.11)
          daemons (>= 1.0.9)
          eventmachine (>= 0.12.6)
          rack (>= 1.0.0)

    PLATFORMS
      ruby

    DEPENDENCIES
      declarative_authorization (= 0.5.2)
      mysql
      prawn (= 0.6.3)
      rack (= 1.0.1)
      rails (= 2.3.5)
      rake (= 0.8.3)
      searchlogic
      thin (= 1.2.11)
    ---------------------------

Please help me deploy it on heroku........

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

塔塔猫 2024-11-30 20:39:03

解决了...

我的应用程序使用rack 1.0.1,rails 2.3.5

,heroku默认激活rake 1.1.0..

所以我将rails应用程序版本切换到2.3.11,它在environment.rb中使用rack 1.1.2并且创建了一个 Gem 文件,
在我的笔记本电脑上安装了测试的捆绑器

...

生成了锁定文件并将其推送到heroku...

终于工作了...

花了一周的时间才让我的应用程序工作...

:)

Solved it...

my app uses rack 1.0.1 , rails 2.3.5

and heroku activates rake 1.1.0 by default..

so i switched my rails app version to 2.3.11 which uses rack 1.1.2 in environment.rb and created a Gem file,
installed bundler

tested on my laptop...

generated lock file and pushed it to heroku...

finally worked....

took a week to get my app working...

:)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文