How to fix template error "CoffeeScript not defined" - ruby-on-rails

I am trying to get the view for my project to show up. but I get this error:
ActionView::Template::Error (ReferenceError: CoffeeScript is not defined):
4: <title>Myapp</title>
5: <%= csrf_meta_tags %>
6:
7: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9: </head>
10:
When I remove lines 7-8 then it works, but I would have no CSS, or JavaScript.
I did not receive this error about a week ago. I'm not sure what the cause is. I tried switching Rails versions. I've tried uninstalling Postgres and setting it up again, but it does not seem to be the issue.
I have Rails 5.0.0.1, and "Ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]". Also I'm using Mac OS Sierra.
I could change the 'application' to 'default' and it works, but I don't understand why it worked about a week ago, and not now.
I also have my view and controller set up, which is the reason why it works when i remove lines 7-8.
This is my gem file:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

There is a problem in coffe-script-source gem 1.12.1 which was recently updated. the issue is that the source file in this version is empty. there is already an open issue , and it should be fixed soon.
For now you can add this to your GemFile
gem 'coffee-script-source', '= 1.11.1'
and run bundle update coffee-script-source until it's fixed.

I also had to use gem uninstall coffee-script-source, then gem install coffee-script-source ... as my gemfile.lock wasn't updating no matter how many times I did 'bundle install' or 'bundle update' after removing coffe-script & coffee-script-source entries in the gemfile.

Related

Rails Error: Sprockets::FileNotFound in Users::Sessions#new

The following error occurred while executing the project after git clone, yarn install and bundle install.
Error logs
Sprockets::FileNotFound in Users::Sessions#new
Showing /Users/{...}/Desktop/{my_project_dir}/app/views/users/sessions/new.html.erb where line #9 raised:
couldn't find file 'angular/1.8.0/angular' with type 'application/javascript'
Checked in these paths:
/Users/{...}/{my_project_dir}/app/assets/config
/Users/{...}/{my_project_dir}/app/assets/fonts
/Users/{...}/{my_project_dir}/app/assets/images
/Users/{...}/{my_project_dir}/app/assets/javascripts
/Users/{...}/{my_project_dir}/app/assets/stylesheets
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/app/assets/images
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/app/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/app/assets/stylesheets
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/vendor/assets/fonts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/vendor/assets/images
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/vendor/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rails_admin-2.0.2/vendor/assets/stylesheets
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/remotipart-1.4.4/vendor/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nested_form-0.3.2/vendor/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jquery-ui-rails-6.0.1/app/assets/images
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jquery-ui-rails-6.0.1/app/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jquery-ui-rails-6.0.1/app/assets/stylesheets
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jquery-rails-4.4.0/vendor/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/apidoco-1.6.2/app/assets/config
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/apidoco-1.6.2/app/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/apidoco-1.6.2/app/assets/stylesheets
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actioncable-6.0.3.4/app/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activestorage-6.0.3.4/app/assets/javascripts
/Users/{...}/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionview-6.0.3.4/lib/assets/compiled
/Users/{...}/{my_project_dir}/node_modules):
6:
7: <div class="text-center w-75 m-auto">
8: <a href="/">
9: <span><img src="<%= image_url('bi.png') %>" alt="" height="50" /></span>
10: </a>
11: <p class="text-muted mt-3"> Title description </p><p class="text-muted"></p>
12: </div>
I don't understand why couldn't find file 'angular/1.8.0/angular' with type 'application/javascript' is happened.
Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.2'
# Use sqlite3 as the database for Active Record
gem 'mysql2', '>= 0.4.4', '< 0.6.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
# gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
gem 'image_processing', '~> 1.2'
# Json Serializer
gem 'fast_jsonapi'
# api docs
gem 'apidoco'
# admin
gem 'rails_admin', '~> 2.0'
# control cors
gem 'rack-cors'
# pagination
gem 'kaminari'
gem 'will_paginate', '~> 3.1.0'
# api call
gem 'rest-client'
# user and admin
gem 'devise'
gem 'devise-jwt'
gem 'omniauth-oauth2'
gem 'omniauth-google-oauth2'
gem 'omniauth-naver'
gem 'devise-i18n'
# manage role
gem 'cancancan'
gem 'rolify'
# active storage
gem 'active_storage_validations'
gem 'aws-sdk-s3'
# Use ActiveStorage variant
gem 'mini_magick', '~> 4.8'
# Scheduled Job
gem 'whenever'
# Active Job
gem 'sidekiq'
gem 'connection_pool'
gem 'redis-namespace'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
First of all I haven't written any angular related code within the project.
i've tried
I deleted the error code and tried again, but the same problem occurs with other erb code.
I thought maybe it could be a version of the gem files. After deleting all gems, I reinstalled ruby (using rbenv), but I got the same error.
I have installed angular#1.8.0, but I got the same error.
Please let me know solution about couldn't find file 'angular/1.8.0/angular' with type 'application/javascript'
I found problem that since multiple projects are running on one server, all the projects have to be loaded locally. In the process, there was a conflict with the apidoco gem.
Solution is to remove apidoco from the Gemfile of the problem project.

LoadError in Devise::RegistrationsController#create

I am using the gem of devise and I am getting error LoadError in Devise::RegistrationsController#create cannot load such file -- bcrypt_ext.. I tried to do some research regarding to this problem and also tried to follow the instruction given(https://stackoverflow.com/questions/35422463/loaderror-in-deviseregistrationscontrollercreate-cannot-load-such-file-bc)
But still having this problem. Any suggestion?
NOTE: The guide that I am using is video guide and I am using ruby on rails on windows 7
Gem File
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# error in devise
gem 'bcrypt-ruby', '~> 3.1', '>= 3.1.5'
# Bundle for authentication
gem 'devise', '~> 4.2', '>= 4.2.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.0.rc1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', github: "rails/sass-rails"
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13.0'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I was also having the same error, and my problem got fixed, please try solution 3
The problem is the compiled windows gem. It would be better if it were deleted and only include the pure ruby version.
Solution one:
You can copy bcrypt_ext.so from \lib\2.1 to \lib the same folder where is bcrypt.rb
Solution two:
You can use the gem install bcrypt --platform=ruby even if I had trouble to select that from rails which it always use the compiled version
Solution three:
git clone https://github.com/codahale/bcrypt-ruby.git
cd bcrypt-ruby
gem build bcrypt.gemspec
gem install gem-compiler
gem compile bcrypt-3.1.10.gem
gem install bcrypt-3.1.10-x64-mingw32.gem --local
Please do one thing and it will solve your problem
remove the version and rest just write this in your Gemfile
gem 'bcrypt-ruby'

Cannot load the httparty gem

I am working on a rails model where I need to use the HTTParty gem. I am using bundler to manage my gems. Although I include HTTParty in the class of my Models directory, when I try to access it on my local server http://localhost:3000/, I get the following error:
uninitialized constant Recipe::HTTParty
I am using bundler so I have learnt that I do not need to require 'httparty'. But even when I do, I get:
cannot load such file -- httparty
After any change I make I restart my server. Would anyone know what I am doing wrong? I can't anything on google. Below you can see what error looks like when I do not require 'httparty'.
class Recipe
include HTTParty
ENV['FOOD2FORK_KEY'] = 'e90655d68b4d4ccbc0c3125a5781da0f'
hostport = ENV['FOOD2FORK_SERVER_AND_PORT'] || 'www.food2fork.com'
error trace:
Rails.root: /Users/Ilias/Documents/Rails Online Course Assignments/graded-assignments/Graded_Assignment_2/Assignment2/recipefinder
Application Trace | Framework Trace | Full Trace
app/models/recipe.rb:2:in `<top (required)>'
app/controllers/recipes_controller.rb:4:in `index'
This error occurred while loading the following files:
httparty
my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
It appears you're missing httparty in your Gemfile. See 0:19 of the video you're following.
(Apologies for the earlier misfire and thank you go Зелёный for keeping me honest.)

Action Controller: Exception Caught

I am new to ruby on rails and started learning in a french website called openclassroom. So in the instructions it tells me to create an html page using this command:
$ rails g controller pages home #we are launching our webpage
$ rails server #we launch our server
When I try accessing http://locahost:3000/pages/home it gives me an error. The screen looks like this...
Link to the image of the error message
Here's the page in the directory for app/views/layouts/application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Castor</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
This is my routes file which can be found in config/routes.rb
Rails.application.routes.draw do
get 'pages/home'
end
This is my home page located in app/views/pages/home.html.erb
<h1>Pages#home</h1>
<p>Find me in app/views/pages/home.html.erb</p>
Although I don't think the problems come from here.
Here is my GemFile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'libv8', '~> 3.16.14.7'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Rails: Can't include scss in rails 4.1.1. - TypeError: Object doesn't support this property or method

Edit: The solution was to lock sass-rails gem to 4.0.2 version.
I have a wierd problem this afternoon.
I was trying to implement a bootstrap theme (Detail admin) but when included in application.css.scss I got an error:
TypeError: Object doesn't support this property or method
(in C:/sites/busapp/app/assets/stylesheets/application.css.scss)
I tried changinh extension of my file to only .css or only .scss but it didn't work. I'm now trying 2h30min so I'm getting desperate and asking if someone else knows how to solve this.
OS: Windows 8.1 64bit
Ruby 1.9.3p545
Rails 4-1.1
My gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'jquery-turbolinks'
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
#====Custom gems====
group :development do
gem 'better_errors'
gem 'pry-rails'
gem 'rails_debug'
# gem 'quiet_assets'
gem 'letter_opener'
end
#Database
gem 'pg'
#Slim
gem 'slim'
gem 'slim-rails'
#Bootstrap
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
#Authentication
gem 'devise'
#Other
gem 'simple_form', '~> 3.1.0.rc1'
# gem 'will_paginate-bootstrap'
# gem 'enumerations'
# gem 'will_paginate-bootstrap'
# gem 'acts_as_simple_translatable'
# gem 'paperclip', '~> 4.1'
# gem 'active_model_serializers'
# gem 'font-awesome-sass'
# gem 'apipie-rails'
# gem 'cancancan', '~> 1.9'
# gem 'redcarpet', '~> 3.1.2'
# gem 'bazaar', '0.0.2'
# gem 'memoist', '0.9.1'
Application.css.scss
#import "bootstrap-sprockets";
#import "bootstrap";
#import "neki";
application.html.slim
doctype html
html
head
title Busapp
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body
= link_to destroy_user_session_path, method: :delete, class: "btn"
| Logout
= render "layouts/flash"
= yield
Also, when I remove only the last file from application.css.scss I don't get an error. And it's not due to file being corrupt because I've tried with multiple ones and in this one is only body backround color set to red.
Another thing that might be relevant is what happens when I run bundle update: http://prntscr.com/4i0xfl
Edit: Even when I try to add something like this directly to my .css.scss it still breaks.
body {background-color: red;}
Don't know for sure, but will just update previous wrong answer with various suggestions which maybe already where tried:
1)
Found this similar issue: github.com/activeadmin/activeadmin/issues/3093 where the solution was to update some gems
2)
And based on the provided output of the screenshot found this: github.com/sstephenson/sprockets/issues/540 where the solution was to precompile the assets (namely bootstrap).. looks like it's a sprocket bug.
3)
And for the railties-dependency error various approaches on SO: stackoverflow.com/questions/17327953/rails-4-0-0-bundler-could-not-find-compatible-versions-for-gem-railties
Looks like you've already solved the problem, but I struggled with this problem yesterday and came upon a decent solution (workaround?), so I wanted to share it.
I'm running Rails 4.1.1 on Windows 7.
I would get an ExecJS Runtime Error with the bootstrap-sass gem, but not with twitter-bootstrap gem (no preprocessor).
Quick 2-step workaround.
Rename application.css.scss --> application.css
create a new file custom.css.scss to hold the code that was previously in application.css.scss
Problem Solved!
Source:
https://www.railstutorial.org/book/filling_in_the_layout#sec-custom_css

Resources