【问题标题】:heroku, thin rack 1.1.0, gemfile requires rack 1.0.1heroku,瘦机架 1.1.0,gemfile 需要机架 1.0.1
【发布时间】:2011-07-13 15:36:38
【问题描述】:

我的 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上部署它........

【问题讨论】:

    标签: heroku gem rack thin


    【解决方案1】:

    解决了...

    我的应用使用 rack 1.0.1 , rails 2.3.5

    heroku 默认激活 rake 1.1.0..

    所以我将我的 rails 应用程序版本切换到 2.3.11,它在 environment.rb 中使用机架 1.1.2 并创建了一个 Gem 文件, 安装捆绑器

    在我的笔记本电脑上测试...

    生成锁文件并推送到heroku...

    终于成功了……

    花了一周的时间让我的应用程序运行起来......

    :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-07
      • 2011-11-11
      • 1970-01-01
      相关资源
      最近更新 更多