I'm trying to create a webapp with rails and bootstrap-sass.
I installed those with instructions from Ruby On Rails With Bootstrap Tutorial (simple), which works.
After installing the bootstrap-sass gem, and trying to open my app in the browser, ruby/rails gets me an error msg.
Showing C:/Sites/bopp/app/views/layouts/application.html.erb where line #7 raised: TypeError: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.>
Entries:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
According to Ruby on Rails Application coult not include stylesheet nor js I changed it, and got another error:
Showing C:/Sites/bopp/app/views/layouts/application.html.erb where line #7 raised: The asset "default.css" is not present in the asset pipeline.
Entries:
<%= stylesheet_link_tag "default", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "default", "data-turbolinks-track" => true %>
I changed application.css to application.css.scss. Entries:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/
@import 'bootstrap-sprockets';
@import 'bootstrap';
Only one change in Gemfile:
gem 'bootstrap-sass'
I changed nothing else.
Then I ran bundle install
.
Ruby Version: 2.3.3
Rails Version: 5.1.0 (downloaded from http://railsinstaller.org/en)
OS: Windows 7
Editor: Sublime Text 2
Browser: Mozilla Firefox