【发布时间】:2018-11-06 05:49:52
【问题描述】:
我在尝试使用 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>
应用程序。scss
* ...........
* It is generally better to create a new file per style scope.
*
*/
@import "bootstrap";
宝石文件
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'
【问题讨论】:
-
您的问题可能与当前 Windows 上的 duktape 问题有关。有关更多信息,请参阅以下答案:stackoverflow.com/a/51125350/7803990
标签: ruby-on-rails ruby bootstrap-4