我们刚刚将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卸载后如何运行?
我将 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)