Jekyll cannot load such file -- jekyll-watch - jekyll

All of the sudden I get this error when I run jekyll serve.
cannot load such file -- jekyll-watch
Dependency Error: Yikes! It looks like you don't have jekyll-watch or one of its dependencies installed.
In order to use Jekyll as currently configured, you'll need to install this gem. The full error message fro
m Ruby is: 'cannot load such file -- jekyll-watch' If you run into trouble, you can find helpful resources
at http://jekyllrb.com/help/!
I've got no clue how to fix this. Does someone else have this problem?
gem list jekyll-watch show me
* LOCAL GEMS *
jekyll-watch (1.2.1)

I have this problem and solved below command line
gem install GEM_NAME_HERE
if you run in after OSX el Capitan use blow command line
sudo gem install -n /usr/local/bin GEM_NAME_HERE

Related

How to solve Jekyll-Include-Cache issue?

I am currently trying to open an already created website made through Jekyll. I use the cd command through the terminal to get to the website file that I pulled from Github. Once I get to the file, I run bundle exec Jekyll serve and it shows this error message:
Dependency Error: Yikes! It looks like you don't have Jekyll-include-cache or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- Jekyll-include-cache' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Jekyll 3.8.5 | Error: Jekyll-include-cache
So I then do gem install Jekyll-include-cache and the issue remains. Does anyone know how to fix this??
The error message means that Jekyll couldn't load the plugin properly.
Ensure that you have listed the plugin in your Gemfile:
# Gemfile
gem "jekyll-include-cache"

Jekyll serve didn't work: It looks like you don't have pygments or one of its dependencies installed

Configuration file: /Users/andrechristoga/Documents/type-theme/_config.yml
Deprecation: You appear to have pagination turned on, but you haven't included the `jekyll-paginate` gem. Ensure you have `gems: [jekyll-paginate]` in your configuration file.
Source: /Users/andrechristoga/Documents/type-theme
Destination: /Users/andrechristoga/Documents/type-theme/_site
Incremental build: disabled. Enable with --incremental
Generating...
Dependency Error: Yikes! It looks like you don't have pygments or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- pygments' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
Liquid Exception: pygments in /Users/andrechristoga/Documents/type-theme/_posts/2014-11-28-markdown-and-html.md
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
pygments
These are the message when I type jekyll serve.
I had the same issue but fixed it installing pygments gem.
gem install pygments.rb
And adding it to my Gemfile.
gem 'pygments.rb'
if you are a windows user, you could run CLI as administrator. This would help.
If you use the command sudo gem install pygments.rb or gem install pygments.rb, it may not works
So you can try root:
su root
gem install pygments.rb
This fix my problem.

Error installing "nokogiri" in a Ruby on Rails application?

I've been following along with the Lynda.com's Ruby on Rails course. I did everything just as mentioned inside the videos.
I am trying to run the rails server command, which should default to WEBrick, correct?
I run the command and it has an issue in the nokogiri.rb file and on line 29 where the error is happening this is what is read:
require 'nokogiri/nokogiri'
Which is what my command prompt is throwing up on when running the rails server command. Any idea what could be causing this? If so, what commands do I need to run to settle this? To me it sounds like something was missed when installing MySQL.
I am not sure what nokogiri is and why rails server won't run and points to that line of code.
The path to this file is (Wherever you installed the folder to)\lib\ruby\gems\2.2.0\gems\nokogiri-1.6.6.2-x64-mingw32\lib
EDIT**: I have a chain of errors, like it goes from -long path-, from -longpath- etcetera. I tried installing the latest gem, and it wasn't successful. Is there a log file I can get to share with you guys to help figure out the issue.
nokogiri is a Ruby "gem" (library) for parsing XML and HTML.
Your Rails project should have a Gemfile which specifies the name and version of each gem needed to run the project. To install the gems listed in the gemfile:
bundle install
After that install completes successfully, Rails should be able to find the nokogiri gem.
Try this
$ sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev
$ sudo gem install nokogiri -v '1.5.11'
According to \lib\ruby\gems\2.2.0\gems\nokogiri-1.6.6.2-x64-mingw32\lib, which means that you are running it on Windows platform. You are using ruby 2.2.0.
I know that nokogiri conflicts with 2.2.* versions of ruby in Windows. I have already encountered this problem. I think it is because of mingw32.
You need to install 2.1.* version of Ruby in order to make Nokogiri work.

rails mysql server error "could not find gem"

When I try to run "rails server" on a new project it returns
Could not find gem 'mysql2 (>= 0) X86-mingw32' in any of the gem sources listed in your Gemfile.
Run 'bundle install' to install missing gems.
I ran 'bundle install' but I'm getting the same error.
I already had mysql installed from the xampp package, but my friend helped me install rails so I'm not sure how he configured it. I use Windows Vista.
Try gem install mysql2. It should then work.
I ran into this issue a while back setting up a RoR dev environment on a windows machine. Had to copy the dll to the ruby/bin folder. See the thread from ruby-forum...
http://www.ruby-forum.com/topic/150580
I had a similar issue. For me, I needed to remove the old Gemfile.lock and allow it be re-generated by running bundle update after I added the same version of mysql to the Gemfile that I had installed via "gem install mysql".
This may or may not be the issue you were running in to, but it appears this error message -> "Could not find gem 'mysql'" can be caused for this reason as well.
I had a similar issue, but when trying to gem install mysql2, it would give me a can't find header files for ruby at ... error message.
Running this fixed the issue for me: sudo apt-get install ruby-dev

Jruby openssl circular dependency

I did a fresh install of jruby 1.6.2, and then wanted to install some gems.
I ran this command:
jruby -S gem install cucumber
And got this error message:
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
LoadError: OpenSSL::SSL requires the jruby-openssl gem
(root) at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8
use_ssl= at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:124
connection_for at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:267
request at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:349
open_uri_or_path at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:306
fetch_path at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:181
load_specs at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:251
load_specs at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:72
list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:224
each at org/jruby/RubyArray.java:1602
list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:220
list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:63
find_matching_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:143
find_matching_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:54
fetch_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:83
find_gems_with_sources at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:108
find_spec_by_name_and_version at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:212
install at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:244
execute at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120
each at org/jruby/RubyArray.java:1602
execute at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115
invoke at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command.rb:278
process_args at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133
run at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103
run at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63
(root) at /Users/Staffr02/Development/jruby-1.6.2/bin/gem:21
So then I tried this:
jruby -S gem install jruby-openssl
And I got the same error, which seemed a little odd. I'm running Mac OS 10.6.6.
I did some googling, and couldn't really find anything, except for a page that said this:
However, this breaks programs that use require 'openssl' as a test for whether openssl is available or not. Soap4r is one such program. In order to support this behavior, simply add
require 'jruby/openssl/gem_only'
So I tracked down the file that seemed to have the error (gem_runner.rb) and added the require line in there. I ran jruby -S gem install jruby-openssl again, and got this error:
ERROR: While executing gem ... (NameError)
uninitialized constant Net::HTTP::OpenSSL
Has anyone else had this problem before? I don't understand what I did wrong! Are there some independent openssl settings that I should delete first?
Any guidance would be much appreciated - thanks,
Rebecca