在 Ubuntu 上安装 v2.3.3 后如何消除 Ruby 1.9.3 通知

在 Ubuntu 上安装 v2.3.3 后如何消除 Ruby 1.9.3 通知

我在 Windows 10 中运行 ubuntu bash shell。要在我的系统上安装 SASS,我必须安装 ruby​​,因此我按照 ruby​​ 网站上的文档下载并安装了 Ruby v1.9.3

我见过这个答案并按照提到的答案安装 Ruby v2.3.3

所以,当我跑步的时候

ruby -v

它给了我

ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux-gnu]

了解版本详细信息。

在此处输入图片描述

但是 Sass 仍然使用 Ruby 1.9.3,并且每次我编译 SASS 时它都会显示 ruby​​ 升级消息,即使我使用的是 ruby​​ v2.3.3:

在此处输入图片描述

有人能告诉我如何摆脱 Ruby v1.9.3,以便我的 sass 可以识别 Ruby v2.3.3


此外,我还看到了另一个问题:当我使用标志运行 SASS 命令时--watch,它会脱离监视模式。不确定这是否与我最近安装的 Ruby v1.9.3 和 Ruby v2.3.3 之间的任何冲突有关。以下是--trace错误的标志输出:

sass --watch assets/sass/style.scss:style.css --style compressed --trace
DEPRECATION WARNING:
Sass 3.5 will no longer support Ruby 1.9.3.
Please upgrade to Ruby 2.0.0 or greater as soon as possible.

>>> Sass is watching for changes. Press Ctrl-C to stop.
/var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/watcher.rb:85:in `initialize': Invalid argument - Failed to watch "/mnt/c/xampp/htdocs/homeloan/wp-content/themes/besthomeloans/assets/sass/partials": the given event mask contains no legal events; or fd is not an inotify file descriptor. (Errno::EINVAL)
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `new'
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `watch'
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:204:in `watch'
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:198:in `block in watch'
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:194:in `each'
        from /var/lib/gems/1.9.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:194:in `watch'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:67:in `block (2 levels) in initialize_worker'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:67:in `each'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:67:in `block in initialize_worker'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:66:in `tap'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:66:in `initialize_worker'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:87:in `initialize'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapters/linux.rb:31:in `initialize'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:228:in `new'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:228:in `works?'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:190:in `block in usable_and_works?'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:190:in `each'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:190:in `all?'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:190:in `usable_and_works?'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:57:in `block in select_and_initialize'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:55:in `each'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/adapter.rb:55:in `select_and_initialize'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/listener.rb:291:in `initialize_adapter'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/listener.rb:283:in `setup'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/vendor/listen/lib/listen/listener.rb:65:in `start!'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/plugin/compiler.rb:408:in `listen_to'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/plugin/compiler.rb:341:in `watch'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/plugin.rb:109:in `method_missing'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/exec/sass_scss.rb:360:in `watch_or_update'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/exec/sass_scss.rb:51:in `process_result'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/exec/base.rb:52:in `parse'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/lib/sass/exec/base.rb:19:in `parse!'
        from /var/lib/gems/1.9.1/gems/sass-3.4.22/bin/sass:13:in `<top (required)>'
        from /usr/local/bin/sass:23:in `load'
        from /usr/local/bin/sass:23:in `<main>'

不确定这是否与 Windows 10 bash shell 有关,但我认为我应该问你们,因为你们是这方面的真正专家。

期待你的答复。

相关内容