Jekyll not regenerating - css

I've been experimenting with Jekyll, and I can't get Jekyll to regenerate file changes (jekyll --server --auto). I'm using Sass, but I can't even get it to work with normal css. I've tried plugins, I've tried pulling other people's repos and just using there code, but no luck. What am I doing wrong?

It's a problem with the gem. An easy fix is:
gem uninstall directory_watcher
gem install directory_watcher -v 1.4.1
Here's a link for reference: https://github.com/mojombo/jekyll/issues/970

I had a problem like this when I installed a sitemap plugin. Once I removed the plugin, the site started generating again.

Related

Bootstrap is wrong version in my rails project

I am going through a rails Udemy course, and we are using bootstrap. The instructor is on an older version and I started using the most recent version. Before long I discovered they are very different, so I wanted to switch to the correct version for the project. I have done gem uninstall gem bootstrap, and rails assets:clean, and went as far as to switch back to main and delete that git branch. I then updated the gemfile to install bootstrap 4.0.0, and ran bundle install. Gemfile lock reflects the changes. I then copied the instructors provided source files for the views we had been working on and the application.scss file. It has not worked. The scss in the rails app is being completely overridden by some trace of bootstrap 5.2. I know this because I inspected the page in the chrome dev console and in the sources there is this link which references the version.
/* line 1, ../../.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bootstrap-5.2.0/assets/stylesheets/bootstrap/_root.scss */
I have restarted the rails server multiple times, but there is no effect. I have navigated to that folder in the rbenv directory and the bootstrap-4.0.0.alpha6 version is listed there, not the 5.2.0. However, the 5.2.0 version is persisting in what is on the browser. No changes that I make in the scss file have any effect. I tried changing all the colors to random ones, but none show up. There are no error messages to share. The CSS simply has no effect and appears to be overridden by this file that I cannot find anywhere in my rails project or on my system. Thank your for any guidance to fix this.
I found an answer.. I had to use rake assets:clobber to clear out precompiled files that had the bootstrap 5.2.0 in them. I did that and then rake assets:precompile and it instantly fixed it.

Is there a way to install a rubygem manually without accessing rubygems.org?

So i have this IPv6 thingy issue where i can't access rubygems and connection times out before it gets to use IPv4. One way or another i managed to install rubygems and when i type -v it all checks out. Now i need Jekyll and Jekyll-paginate-v2. I tried gem install jekyll and it didn't work for reasons stated above. Strangely enough i was able to install Jekyll via sudo apt install jekyll. Tried that with jekyll-paginate-v2 but there's no such option. So is there any way to install it without using gem command?
ok so i found a way of solving this issue.
to install a gem you need a .gem file and since you can't access rubygems.org we will get it from github. just go to your gem's github page, download it and then open bash in that directory, type gem build gemname.gemspec and it will create a .gem file in this directory. after that just use gem install --local gemname.gem and that's it.

Wordpress plugin install fail

Today I am starting a new project and I am stuck on wordpress plugins installation
Downloading install package from
https://downloads.wordpress.org/plugin/types.1.8.11.zip…
Unpacking the package…
Installing the plugin…
The package could not be installed. No valid plugins were found.
Plugin install failed.`
I ve tried different plugins and all of them produce this error! any ideas?
you can use class-tgm-plugin-activation to install your plugin automatically at your theme
visit and download, https://github.com/TGMPA/TGM-Plugin-Activation
include at your functions
I managed to sucessfully install and activate it, right now. I used wp-cli, but that should not make much difference. I can recommend it though, as it is more verbose, which helps tracking down errors
What is the result of
ls -l .../path/to/wordpress/wp-content/plugins
Assuming you are on Linux/Unix. Do the other plugins have different permissions/users?

Update SASS in ruby

I am working on a project based on ruby. How can I update the SASS engine? My PC has one version, but my project doesn't.
I've tried using gem update, but it doesn't update SASS.
Any help?
If you are using bundler, you can just run
bundle update sass
Without bundler rubygems can install fresh version, but your app may use old one. Try to uninstall older version.
But the best solution to escape such problems - is to use bundler.

Installing Sass on Gentoo

I've been trying to install Sass on Gentoo, but it hasn't been going too well. Unfortunately, the latest version of Sass in portage is 3.1.21.
What I want to use Sass for requires at least Sass 3.2, which is available through rubygems.
What I've tried:
emerge dev-ruby/sass (installs an old version)
gem install sass
The second command appears to install the Sass gem. However, I do not use Rails or Ruby in any other aspect apart from Sass, so the gem appears useless to me. In addition, I do not know where gems are installed to or how to use them (I'm a ruby noob.) All I want to do is call sass from the command line.
Are there any ways to obtain an up-to-date version of Sass which I can just use from the command line?
Cheers.
On Gentoo, user-installed gems are not in your PATH by default. I have created a bug report because while user-installed gems work much better than they used to, this problem really needs to be rectified. You can help by voicing your opinion in the report and linking back to this page. To get things working, you can either deploy the script I uploaded to the report or use RVM instead, which will give you much more consistent behaviour across distros.
I'm wondering but all the answers looks weird for me. One of the biggest gentoo advantage is ebuild writing which is easy as pie so every user can contribute whatever he needs.
Add local overlay
fork upstream ebuild to your local overlay
bump version
use
test
attach tested ebuild to bug report, maybe also contact someone on #gentoo-dev-help
Trust me, using gem (or cabal, or whatever) instead of your package manager if way to mess your system.
Some might find useful to know that under Gentoo you can install sass using emerge which will solve the PATH problem some people are encountering.
# emerge -av sass
after which you should be able to use sass without problem.
Another solution would be to use rvm which could make things more portable and uniform across environments.
edit: in case someone's asking: to install rvm just follow the instructions found at: https://rvm.io/rvm/install/ and install the stable version.
I don't see a down side to using the gem version of Sass. I'm also not a Ruby/RoR developer (I use Haskell/PHP), and I just use the gem. I know just enough about gems to install/uninstall them, and that seems good enough for using Sass.
Installing and upgrading Sass is done with the same command:
sudo gem install sass
Installing Sass via gems gives you the ability to use it via command line, just like it shows on the official website: http://sass-lang.com/.
sass --watch style.scss:style.css
Other command line options can be found via --help or on their docs: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#using_sass
sass --help
Consider using compass it will accepts command lines like: compass [YOUR-FILE].sass and can also compass watch [SASS FOLDER] and 'compile' css to it.
http://compass-style.org/
To install using a gem
gem update --system
gem install compass
Installation

Resources