小编Dav*_*kin的帖子

捆绑版本不匹配 - bundler 2,ruby 2.6

我们刚刚将ruby更新为2.6,将bundler更新为2.现在我们得到:

# bin/rails console
You must use Bundler 2 or greater with this lockfile.
Run Code Online (Sandbox Code Playgroud)

以前发生过bundle exec:

# bundle exec rails console
You must use Bundler 2 or greater with this lockfile.
Run Code Online (Sandbox Code Playgroud)

那时我们默认仍然运行1.17.2:

# gem list bundler

*** LOCAL GEMS ***

bundler (2.0.1, default: 1.17.2)
Run Code Online (Sandbox Code Playgroud)

所以我们跑了gem uninstall bundler --version 1.17.2然后bundle exec开始工作.

但是bin存根bin/rails仍然是失败的.

1.17.2卸载后如何运行?

ruby ruby-on-rails bundler ruby-2.6

7
推荐指数
2
解决办法
3023
查看次数

Webpacker:resolved_pa​​ths 选项已被弃用。改用 additional_paths

我将 webpacker 从 4.x 升级到 5.2.1 并开始收到此警告:

The resolved_paths option has been deprecated. Use additional_paths instead.
Run Code Online (Sandbox Code Playgroud)

这看起来很简单,我的config/webpacker.yml几乎没有修改:

  # Additional paths webpack should lookup modules
  # ['app/assets', 'engine/foo/app/assets']
  resolved_paths: [
    'app/assets',
  ]
Run Code Online (Sandbox Code Playgroud)

但是在s/resolved_paths/additional_paths/那里做一个简单的工作是行不通的:

[Webpacker] Compiling...
[Webpacker] Compilation failed:
Hash: 7448f36a43523a84e146
Version: webpack 4.44.1
Time: 5803ms
Built at: 10/15/2020 11:57:06 AM
                                          Asset      Size            Chunks                         Chunk Names
         js/application-a019b363e4513fe092e6.js  3.02 MiB       application  [emitted] [immutable]  application
     js/application-a019b363e4513fe092e6.js.map  3.03 MiB       application  [emitted] [dev]        application
         js/hello_react-40e806bdb6de496532d8.js  1.05 MiB       hello_react  [emitted] [immutable]  hello_react
     js/hello_react-40e806bdb6de496532d8.js.map …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails webpacker

5
推荐指数
1
解决办法
1439
查看次数

标签 统计

ruby-on-rails ×2

bundler ×1

ruby ×1

ruby-2.6 ×1

webpacker ×1