Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RubyonRails-不导入SCS_Ruby On Rails_Ruby_Bootstrap 4 - Fatal编程技术网

Ruby on rails RubyonRails-不导入SCS

Ruby on rails RubyonRails-不导入SCS,ruby-on-rails,ruby,bootstrap-4,Ruby On Rails,Ruby,Bootstrap 4,我在尝试使用bootstrap gem时正在制作一个新的RoR应用程序,但在第一次运行它时遇到了一些问题。 看起来Ruby很难包含scss文件 ExecJS::ProgramError in Visitor#index Showing */app/views/layouts/guest.erb where line #8 raised: identifier '(function(opts, pluginOpts) {return eval(process' undefined Guest.

我在尝试使用bootstrap gem时正在制作一个新的RoR应用程序,但在第一次运行它时遇到了一些问题。 看起来Ruby很难包含scss文件

ExecJS::ProgramError in Visitor#index
Showing */app/views/layouts/guest.erb where line #8 raised:

identifier '(function(opts, pluginOpts) {return eval(process' undefined
Guest.erb

<!DOCTYPE html>
<html>
<head>
  <title>FooBar</title>
  <%= csrf_meta_tags %>
  <%= csp_meta_tag %>

  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
</head>

<body>
<%= yield %>
</body>
</html>
Gem文件

ruby '2.4.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
#Bootstrap
gem 'bootstrap', '~> 4.1.1'

消息“identifier”(函数(opts,pluginOpts){return eval(进程“未定义”)看起来像是JavaScript问题。该文本与此Rails中的代码相匹配。不幸的是,我不知道有什么快速修复建议,但由于该函数的选项采用文件名,我会仔细检查以确保样式表文件名中的任何位置(即,文件本身以及它们可能被引用的任何位置)都没有拼写错误.

从Gemfile中删除duktape gem,并确保已安装Node.js或其他内容。应提供指向的备选方案注释。

您的问题可能与Windows上duktape的当前问题有关。有关详细信息,请参阅以下答案:
ruby '2.4.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
#Bootstrap
gem 'bootstrap', '~> 4.1.1'