I'm trying to run Jekyll server in --watch mode in Windows 7. But it fails to start and throws an error message:
blog [ master ] > jekyll server --trace --watch
Configuration file: C:/vraa/repo/blog/_config.yml
Source: C:/vraa/repo/blog
Destination: C:/vraa/repo/blog/_site
Generating...
done.
C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-2.7.7/lib/listen/adapter/windows.rb:21:in `rescue in usable?': undefined method `_log' for Listen::Adapter::Windows:Class (NoMethodError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/listen-2.7.7/lib/listen/adapter/windows.rb:17:in `usable?'
While building the jekyll site and starting the server is successful, the --watch mode is the one that is failing.
Any ideas?
I'm using Jekyll version 2.0.03 in Windows 7 64 bit and my ruby version is 1.9.3.
There have been some changes in the newer versions of Jekyll (v 1.0+). The --server command is now obsolete. To run a server in watch mode, type the following:
jekyll serve --watch
Also, run the following to update your listen ruby gem to 2.7.8 (released on June 12, 2014) which has your bug fixed:
gem update listen
That should get you running.
update your 'listen' gem to 2.7.8
Figured out what was the problem. It was the 'listen' ruby gem version that was causing the jekyll to start in --watch mode. Reverted the 'listen' gem to an old version then the server starts fine (though, with a warning but not a showstopper).
gem uninstall listen --version 2.7.7
gem install listen --version 2.6.0
This article helped me with similar issue on Win10 with Jekyll 3.3.0. See "May not work" part: https://labs.sverrirs.com/jekyll//5-wdm-gem.html
Related
I am trying to install Jekyll on my x64 windows 10 computer. I have tried both chocolatey and the normal install but I keep getting the same SSL error:
The installation page and you tube videos no longer work to install Jekyll, so how do I get it with its new release?
you first should install Ruby and Rubygems. Afterwards you can simply install jekyll as gem:
gem install jekyll bundler jekyll-feed minima sass
Note: probably the SSL error is related to this topic:
https://github.com/rubygems/rubygems/issues/1736#issuecomment-261862935
I followed the following link to install jekyll
https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/
However when I run " jekyll serve" , I get the following error
jekyll 3.2.0 | Error: different prefix: "/" and
"C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/minima-1.0.1"
I am using os windows 10.pls help.
Update1:
I installed 3.1.6, but I am getting the follwoing error
c:\myblog>jekyll build C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in block in materialize': Could not find j ekyll-3.2.0 in any of the sources (Bundler::GemNotFound) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:inmap!' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:88:in materialize' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:140:inspecs' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:185:in specs_for' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:174:inrequested_specs' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/environment.rb:19:in requested_specs' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:14:insetup' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler.rb:95:in setup' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-3.1.6/lib/jekyll/plugin_manager.rb:33:inrequire_from_bundler' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/jekyll-3.1.6/bin/jekyll:9:in <top (required)>' from C:/Ruby200-x64/bin/jekyll:23:inload' from C:/Ruby200-x64/bin/jekyll:23:in `
Update2:
Updated to jekyll 3.2.1, working now. Thanks everybody.
Identical issue here.
The 3.2.0 build is currently broken for Windows. Anomaly logged on project here https://github.com/jekyll/jekyll/issues/5146 and should be fixed on a future release.
Continuing to try for a workaround. (Roll-back Jekyll version...?)
I rolled back for now :
gem uninstall jekyll -v 3.2.0
gem install jekyll -v 3.1.6
Jekyll 3.2.0 was broken on Windows. Run gem update jekyll to upgrade to 3.2.1 which supports Windows.
I found out that jekyll 3.2.1 works on versions of windows 7 but does not on later versions....
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.
I have been trying to configure rails in windows. Ruby has got successfully installed but when i tried to give gem update --system command in my cmd prompt the following happens. MySQL is already installed in my system and is working fine.
C:\Ruby187\bin>gem update --system
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.8.11
Updating RubyGems to 1.8.11
Installing RubyGems 1.8.11
RubyGems 1.8.11 installed
== 1.8.11 / 2011-10-03
* Bug fix:
* Deprecate was moved to Gem::Deprecate to stop polluting the top-level
namespace.
------------------------------------------------------------------------------
RubyGems installed the following executables:
C:/Ruby187/bin/gem
C:\Ruby187\bin>
please help me in this solving this issue. Thanks in advance.
I doesn't see any errors?
Type
gem -v
and you see your current gem version
In our team we used to get this problem everytime we svn up. We have configured bundle in our application. Here we have a list of gems in a file called GemFile. So every time we svn up our code we need to ./bundle install to have all our required gems for this application. This solved our problem.
I've been having a tough time getting jRuby on Rails 3 deployed on Tomcat 6. I got it to work exactly once.
I modified my database.yaml and Gemfile to check for jRuby, something like this:
if defined?(JRUBY_VERSION)
gem 'jdbc-mysql'
#gem 'jdbc-sqlite3'
gem 'activerecord-jdbc-adapter'
gem 'activerecord-jdbcmysql-adapter'
#gem 'activerecord-jdbcsqlite3-adapter'
gem 'jruby-openssl'
gem 'jruby-rack'
gem 'warbler'
else
gem 'mysql'
gem "mongrel"
gem 'ruby-debug'
end
Some environment settings:
$ rvm -v
rvm 1.0.14
$ jruby -v
jruby 1.5.3 (ruby 1.8.7 patchlevel 249) (2010-09-28 7ca06d7) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]
When I run jruby -S bundle install everything goes smoothly.
It's when I try to do something like rake db:migrate, jruby -S rake db:migrate or warble that I get 50 DEPRECATION WARNINGs and an eventual stackoverflow.
I solved this issue by deleting the warbler plugin, it did not like the line Warbler::Task.new
Next, I ran warble config to give me a config/warbler.rb file.
And finally, warble to create my .war file. So far so good.
Now I move the .war file to my Tomcat webapps. Everything works fine except for an error:
Oct 10, 2010 1:34:46 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Application Error
org.jruby.rack.RackInitializationException:
http://github.com/plataformatec/devise.git (at master) is not checked out.
Please run 'bundle install'
I solved this problem once and only once by going into my webapps/myapp/WEB-INF and running jruby -S bundle install
It no longer works and I have no idea what is going on.
I believe this can be called a bug in the current version of Warbler. Using git repositories in your Gemfile don't quite get staged properly in the war file and Bundler is still looking for a checked out repository on disk.
A future version of Warbler will probably do something along the lines of bundle --deployment when you create the war file.
For now, to work around, you might have to vendor the devise code.
The current version of warbler (1.3.6) will also exhibit this behavior if you build a war file with warbler war. I've found that building with the following command works:
warbler compiled war
Hopefully future versions will address this more completely.