sass Error: Undefined variable: $sidebar-spacing-horizontal - ruby-on-rails

I purchased the learnplus theme from themeforest and tried to build it. However while building i am constantly getting this error:
node_modules/adminplus/src/sass/sidebar-components/_card.scss
Error: Undefined variable: "$sidebar-spacing-horizontal".
on line 3 of node_modules/adminplus/src/sass/sidebar-components/_card.scss
>> margin-bottom: $sidebar-spacing-horizontal;
-----------------^
I tried to search a lot but was in vain as i am a total noob with no understanding about Sass. I assume its something to do with ROR syntax file which is compiled into .css.
Can someone help me with the issue? I am not understanding how to resolve this error? Any help will be highly appreciated

I am not familiar with that theme, but whenever you see some variable declarations of the theme, you can make something like this - $sidebar-spacing-horizontal: 20px;. After that you can try to compile again.

Related

APA style latex - Ubuntu

I am trying to use apastyle via
\bibliographystyle{apa}
for my reference list. Unfortunately, I get the error message:
"I found no style file" when using Bibtex.
Can someone maybe explain to me how to fix this error? I am using (TexLive2019 Debian) on
Ubuntu20.
Thanks for any suggestions.

CableReady (Rails) Basic case giving mystifying error message

cable_ready 4.5.0
rails 6.1.4.1
ruby 3.0.2p107
This is a simple example from the basic tutorial (https://www.youtube.com/watch?v=F5hA79vKE_E) I suspect the error I am getting is because either cable_ready or rails evolved a little and created a tiny incompatibility.
I get this error in the JS console:
It is triggered when in my controller I ask cable ready to:
cable_ready["timeline"].console_log(message: "***** cable ready post created")
Which leads to my timeline_channel to:
received(data) {
console.log("******** Received data:", data.operations)
if (data.cableReady) CableReady.perform(data.operations)
}
My interpretation is perform causes this line in cable_ready.js line 13:
operations.forEach(function (operation) {
if (!!operation.batch) batches[operation.batch] = batches[operation.batch] ? ++batches[operation.batch] : 1;
});
Is finding something in the received data that it doesn't like.
That's where my trail ends. Can someone see what I am doing wrong, or tell me what other code you'd like me to include?
Solution: downgrade the version of the cable_ready javascript library.
I previously (maybe a year ago) did this tutorial using CableReady 4.5, Ruby 2.6.5 and Rails 6.0.4 and it worked like a charm back then as well as today.
But today, I tried this tutorial again on a duplicate project--same versions of CR, Ruby, and Rails and now I get java console errors similar to yours.
TypeError: undefined is not a function (near '...operations.forEach...')
perform -- cable_ready.js:13
received -- progress_bar_channel.js:8
I looked at the output of yarn list and saw that cable_ready was version 5.0.0-pre8 on the bad project and it was 5.0.0-pre1 on the good project. The downgrade could be accomplished with yarn add cable_ready#^5.0.0-pre1 in the bad project folder and now both projects work.
FYI for other newbies like me trying to understand how CableReady works: This tutorial gives another example of CableReady, and was also fixed the same way.

Ruby gem origami sign signature failed

I'm trying to make the PDF file with signature with origami gem, follow this example https://github.com/gdelugre/origami/blob/master/examples/signature/signature.rb
Now i just run this signature.rb and got error
[error] Breaking on: ">>\nendobj\n..." at offset 0x1f6f3
[error] Last exception: [Origami::InvalidObjectError] Failed to parse object (no:43,gen:0) -> [ArgumentError] wrong number of arguments (given 1, expected 0; required keyword: year)
I have no idea to move forward :'<
I also found the sign method of gem at https://github.com/gdelugre/origami/blob/master/lib/origami/signature.rb, and have take a look, I can't find any specific things to do :'<
Might this example is outdate?
The error message is known see https://github.com/gdelugre/origami/issues/80
A fix should be available https://github.com/gdelugre/origami/pull/74/commits
But has not been added so use newer file from the fork https://github.com/pocke/origami/tree/fix-ruby-2.7-kwargs-warnings
Specifically you need this updated file and may need to follow any other suggestions from above.
https://github.com/pocke/origami/raw/fix-ruby-2.7-kwargs-warnings/lib/origami/filters/predictors.rb
However it always worth looking for a fork with many more recent improvements such as
https://github.com/joelsondrew/origami

What is the purpose of foundation.dart in Writing and Reading Files using path_provider plugin?

I am trying to understand how to read and write data on text files using path_provider plugin.
I've read an example on how to use it on Flutter from here. Then I saw this line of code which I don't understand:
import "package:flutter/foundation.dart";
I tried to comment it out from the code and ran "flutter run":
//import "package:flutter/foundation.dart";
And to my surprise, it ran perfectly. Although it raised some errors like:
E/DartVM (23127): 'dart:core/runtime/libintegers.dart': error: Unexpected tag 0 (Nothing) in ?, expected expression
E/DartVM (23127): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method ~ in class _Smi
and
E/DartVM (23237): 'dart:typed_data': error: Unexpected tag 15 (DirectPropertyGet) in ?, expected type
E/DartVM (23237): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method get:x in class _Float32x4
But it ran well. I don't know why. When should I use it? What method from the code did the foundation.dart was used?
I would appreciate any kind of enlightment. Thanks in advance.
[UPDATE]
I think I understand why foundation library was used in the example code. Maybe because the example code used the "required" constant from the foundation library.

prerendering in react_on_rails app is throwing error

Whenever I switch prerendering to true for my react component in my rails view I'm getting this error
undefined local variable or method `e' for ReactOnRails::ServerRenderingPool::Exec:Class
I've found on the shakacode site that there's a typo in lib/react_on_rails/server_rendering_pool/exec.rb
but I don't know how to access that file - it's nowhere in my directory - am I completely missing something here?
This has been fixed already on: https://github.com/shakacode/react_on_rails/pull/1020

Resources