创建新的Rails应用程序时出现Bundle / Node / Web Pack错误

时间:2020-04-15 11:51:16

标签: node.js ruby-on-rails npm webpack

早上好

我正在尝试生成一个新的Rails应用程序,但是遇到了很多错误。似乎与webpacker和节点相关。

  • 我尝试卸载node和webpacker并重新安装。
  • 我尝试再次下载node.js。
  • 我试过了;运行`bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java 找不到作为gemfile的文件。
  • 我尝试了https://github.com/lydell/resolve-url#deprecated
  • 关于此事,我经历了各种讨论,但似乎没有任何解决办法

我是一名新编码员,我们将不胜感激。我正在使用macOS Catalina 10.15.4

$this->form_validation->set_rules('username', 'Username', 'required|min_length[5]', array('required' => 'Username is required.','max_length' => 'Max characters allowed: 5') );

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
warning @rails/webpacker > node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

2 个答案:

答案 0 :(得分:0)

看起来您可能缺少xcode命令行工具。

尝试先运行xcode-select --install

答案 1 :(得分:0)

我尝试运行xcode-select --install

返回:

> xcode-select: error: command line tools are already installed, use "Software Update" to install updates.

然后我尝试了softwareupdate --list

返回了:

Finding available software
No new software available.