【问题标题】:Use ActiveSupport 2.3.5 in a Rails 3 application?在 Rails 3 应用程序中使用 ActiveSupport 2.3.5?
【发布时间】:2011-02-22 08:15:59
【问题描述】:

是否可以在 Rails 3 应用程序中使用 ActiveSupport 2.3.5?

我有我的 Rails 3 应用程序设置和工作,但是,我想用来处理 API 的 gem 只支持 ActiveSupport 2.3.5。有没有办法让两者同时运行?

如需更多信息 - 可在此处查看应用程序:

https://github.com/dannymcc/Beanstalk-Deployment

宝石可以在这里看到:

https://github.com/iSabanin/beanstalkapp

如果不是,是降级到 Rails 2.3 的唯一选择吗?

谢谢,

丹尼

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 gem activesupport


    【解决方案1】:

    尝试分叉回购并更改:

    s.add_runtime_dependency(%q<activeresource>, ["= 2.3.5"])
    

    beanstalkapp.gemspec

    s.add_runtime_dependency(%q<activeresource>, ["= 3.0.4"])
    

    之后你可以在你的 Gemfile 中使用它:

    gem 'beanstalkapp', :git => 'https://github.com/dannymcc/beanstalkapp.git'
    

    【讨论】:

    • 有没有办法从我的 fork 而不是作者安装 gem?
    • 由于某种原因出现错误。 MacBook:beanstalkdeployments danny$ bundle install Fetching github.com/dannymcc/beanstalkapp error: The requested URL returned error: 500 while access github.com/dannymcc/beanstalkapp/info/refs fatal: HTTP request failed 运行 git clone "https://github.com/dannymcc/beanstalkapp" "/Library/Ruby/Gems/1.8/cache/bundler/git/beanstalkapp-51b398041f9fd5bbc2d49d0b1aef40611947a2f6" --bare --no-hardlinks 时 git 出现错误。无法完成捆绑。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多