我在尝试使用 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
Run Code Online (Sandbox Code Playgroud)
来宾
<!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>
Run Code Online (Sandbox Code Playgroud)
应用。scss
* ...........
* It is generally better to create a new file per style scope.
*
*/
@import "bootstrap";
Run Code Online (Sandbox Code Playgroud)
宝石文件
ruby '2.4.4'
# Bundle edge Rails …Run Code Online (Sandbox Code Playgroud)