Mat*_*uza 2 ruby ruby-on-rails 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
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 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'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1116 次 |
| 最近记录: |