【问题标题】:Switch rails app from "latest stable" rails gem to "bleeding edge"将 rails 应用程序从“最新稳定”的 rails gem 切换到“bleeding edge”
【发布时间】:2017-01-28 19:28:59
【问题描述】:

最近我用“latest table rails”写了一个新应用

但是,存在一些问题,它们在“出血边缘”中得到了修复。

那么我如何告诉我的应用程序使用我认为比“最新稳定”更新的“出血边缘”

【问题讨论】:

    标签: ruby-on-rails bundler gemfile


    【解决方案1】:

    Rails 依赖于 arel,因此您需要手动抓取它们。目前这是每个人的最前沿:

    gem 'rails', '~> 5.1.0.alpha', github: 'rails/rails', ref: 'abfd091980faaa4404db5fbfdf77c68a35684d08'
    
    gem 'arel', '~> 8.0', github: 'rails/arel', ref: 'd6af2090b16f7d061aa43913d610c6fada58b7e2'
    

    rails/rails commit history

    rails/arel commit history

    将这些添加到您的 Gemfile 并运行 bundle

    假设没有任何冲突,您应该得到如下所示的输出:

    19:46:18$ bundle
    Fetching https://github.com/rails/rails.git
    Fetching https://github.com/rails/arel.git
    Fetching gem metadata from https://rubygems.org/.........
    Fetching version metadata from https://rubygems.org/..
    Fetching dependency metadata from https://rubygems.org/.
    Resolving dependencies...
    Using rake 12.0.0
    Using concurrent-ruby 1.0.4
    Installing i18n 0.8.0 (was 0.7.0)
    Using minitest 5.10.1
    Using thread_safe 0.3.5
    Using builder 3.2.3
    Installing erubi 1.5.0
    Using mini_portile2 2.1.0
    Using rack 2.0.1
    Installing nio4r 2.0.0 (was 1.2.1) with native extensions
    Using websocket-extensions 0.1.2
    Using mime-types-data 3.2016.0521
    Using arel 8.0.0 (was 7.1.4) from https://github.com/rails/arel.git (at d6af209@d6af209)
    Using bundler 1.13.1
    Using byebug 9.0.6
    Using coffee-script-source 1.12.2
    Using execjs 2.7.0
    Using method_source 0.8.2
    Using thor 0.19.4
    Using debug_inspector 0.0.2
    Using ffi 1.9.17
    Using multi_json 1.12.1
    Using rb-fsevent 0.9.8
    Using puma 3.6.2
    Using sass 3.4.23
    Using tilt 2.0.5
    Using sqlite3 1.3.13
    Using turbolinks-source 5.0.0
    Using tzinfo 1.2.2
    Using nokogiri 1.7.0.1
    Using rack-test 0.6.3
    Using sprockets 3.7.1
    Installing websocket-driver 0.6.5 (was 0.6.4) with native extensions
    Using mime-types 3.1
    Using coffee-script 2.4.1
    Using uglifier 3.0.4
    Using rb-inotify 0.9.7
    Using turbolinks 5.0.1
    Using activesupport 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using loofah 2.0.3
    Using mail 2.6.4
    Using listen 3.0.8
    Using rails-dom-testing 2.0.2
    Using globalid 0.3.7
    Using activemodel 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using jbuilder 2.6.1
    Using spring 2.0.1
    Using rails-html-sanitizer 1.0.3
    Using activejob 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using activerecord 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using spring-watcher-listen 2.0.1
    Using actionview 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using actionpack 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using actioncable 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using actionmailer 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using railties 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using sprockets-rails 3.2.0
    Using coffee-rails 4.2.1
    Using jquery-rails 4.2.2
    Using web-console 3.4.0
    Using rails 5.1.0.alpha (was 5.0.1) from https://github.com/rails/rails.git (at abfd091@abfd091)
    Using sass-rails 5.0.6
    Bundle complete! 16 Gemfile dependencies, 62 gems now installed.
    Use `bundle show [gemname]` to see where a bundled gem is installed.
    ~/test_application
    19:49:25$ 
    

    这表明 Rails 处于最前沿:abfd091,目前。

    这里应该包括通常的警告词,即在最新的稳定版本上使用前沿是非常危险的!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-31
      • 2012-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多