I'm using Ruby on Rails, and I installed all the necessary applications and updates for gems. I already exhausted/researched most of all possible answer for this error and tried all of it, but still am having no luck.
/Users/u=Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:76:in `require': cannot load such file -- false (LoadError)
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:72:in `each'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:72:in `block in require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `each'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler/runtime.rb:61:in `require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.5/lib/bundler.rb:134:in `require'
from /Users/Username/Downloads/job4quote/config/application.rb:7:in `'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in '
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/Username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `'
from script/rails:6:in `require'
from script/rails:6:in `'
Is there a way to access these .rb files to make necessary changes?
As shown here -> warning: circular argument reference
The problem seems to be caused by the higher version of ruby (In my case rails 3.2.13 and ruby 2.2) and using an older version of rails. One solution in which worked for me was to use ruby 2.0 and to update my gem file (RVM Capistrano).
gem 'rvm-capistrano', require: false
run the bundle install command. After that everything worked as expected.
silly of me, you can access the file by browsing it thru terminal
$ open .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-3.2.13/lib/active_support/values
and made changes on that file as shown on the link about.
Sorry new with ruby.
Related
Whenever I try to run my Ruby program I get this error:
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require': cannot load such file -- ffi_c (LoadError)
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:inrescue in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:6:inrescue in '
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:3:in <top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows/root_certs.rb:2:in'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows.rb:7:in require_relative'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows.rb:7:in'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient.rb:16:in <top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/rest_client.rb:2:in'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:inrescue in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from form_response_transfer.rb:3:in [main method]
The program (form_response_transfer.rb) used to work fine, but now, there seems to be some problem with my rest-client gem. I haven't changed any of the code in the program since it last worked, so I'm not sure exactly what I did to cause this error. In general, gems that end with X64-mingw32 have been giving me problems lately (some other examples include nokogiri, sqlite3, and pg). How should I go about trying to fix this error? Could there be some problem with how Ruby is set up on my computer?
Try to uninstall FFI gem
gem uninstall ffi
and then reinstall it with below command:
gem install ffi --platform=ruby
It worked on my side (Win7 x64)
I'm trying to use this gem: csv2json (0.3.0) and I'm getting an error.
On my file essaie.rb:
require 'csv2json'
File.open('essaie.csv', 'r') do |input|
File.open('output.json', 'w') do |output|
CSV2JSON.parse(input, output)
end
end
user#user-ThinkPad-L430:~/development/public/opendata/other$ ruby essaie.rb
/home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- orderedhash (LoadError)
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/user/.rvm/gems/ruby-2.1.0/gems/csv2json-0.3.0/lib/csv2json.rb:4:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from essaie.rb:1:in `<main>'
When I remove the version 0.3.0(csv2json) and I installed the previous version I'm getting this error:
user#user-ThinkPad-L430:~/development/public/opendata/other$ ruby essaie.rb
/home/user/.rvm/gems/ruby-2.1.0/gems/csv2json-0.2.0/lib/csv2json.rb:17:in `initialize': wrong number of arguments (2 for 0) (ArgumentError)
from /home/user/.rvm/gems/ruby-2.1.0/gems/csv2json-0.2.0/lib/csv2json.rb:17:in `new'
from /home/user/.rvm/gems/ruby-2.1.0/gems/csv2json-0.2.0/lib/csv2json.rb:17:in `parse'
from essaie.rb:5:in `block (2 levels) in <main>'
from essaie.rb:4:in `open'
from essaie.rb:4:in `block in <main>'
from essaie.rb:3:in `open'
from essaie.rb:3:in `<main>'
any help?
notes : file name essaie.csv contains the same data as input.csv (from the example of the documentation)
Just ran into this myself. Looks like they just forgot a dependency. Gems come with a list of other gems they require, but this developer probably had the orderedhash gem installed already and didn't pay attention to the need for it to be part of the dependency list for csv2json.
I typed:
gem install orderedhash
And then csv2json worked just fine for me.
See also a github issue recently opened about this:
https://github.com/darwin/csv2json/issues/12
Just recently skanked my PC, and I've not used Jekyll in a while, or indeed Ruby, however after thinking I'd set up everything correctly, when I try and run...
jekyll build or
jekyll serve
I get this error:
Generating... Liquid Exception: cannot load such file -- yajl/2.0/yajl i
n _posts/2013-09-21-welcome-to-jekyll.markdown
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require': c
annot load such file -- yajl/2.0/yajl (LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl/yajl.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib
/yajl.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:i
n `rescue in require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments/
popen.rb:3:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:i
n `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.5.4/lib/pygments.
rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in
`require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:52:in `render_pygments'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/tags/hi
ghlight.rb:45:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:106:in `block in render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:93:in `render_all'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/block.r
b:82:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:124:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.4/lib/liquid/templat
e.rb:132:in `render!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:88:in `render_liquid'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/convert
ible.rb:150:in `do_layout'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/post.rb
:259:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:241:in `block in render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:240:in `render'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/site.rb
:39:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
.rb:18:in `process_site'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:23:in `build'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/lib/jekyll/command
s/build.rb:7:in `process'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.3.1/bin/jekyll:77:in `
block (2 levels) in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:180:in `call'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/c
ommand.rb:155:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:402:in `run_active_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/r
unner.rb:66:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/d
elegates.rb:7:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/i
mport.rb:10:in `block in <top (required)>'
I think it's related to pygments.rb somehow. If i remove the first post that has the syntax highlighting demo, the build works. I've attemped to update pgyments to 0.5.4 but this seemed to make no different. I think got an error that pygments.rb is locked to 0.3.4:
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
You have requested:
pygments.rb ~> 0.5.4
The bundle currently has pygments.rb locked at 0.3.7.
Try running `bundle update pygments.rb`
Can anyone shed any light on this? It's driving me nuts. Running Ruby 2.0.0p353.
I did following
gem install rouge
and then
added following line in the _config.yml
highlighter: rouge
I found this solution from following page's last comment
https://github.com/jekyll/jekyll-help/issues/50
I encountered a similar problem today when trying to setup Octopress/Jekyll.
Here is the solution I found.
Step 1
Go to your ruby gems directory.
In my case it's located at C:/Ruby21/lib/ruby/gems/2.1.0/gems
Look for yajl.
You will see a folder called yajl-ruby-1.1.0-x86-mingw32
You may or may not see one called yajl-ruby-1.2.1
The one with a -ruby-1.1.0-x86-mingw32 tail is the default. And leads to the error.
What we want to use is the other version
Step 2
If you do not have the none mingw32 version, run
gem install yajl-ruby
This will install the latest version.
In my case the latest version was 1.2.1
Step 3
Change the default from the mingw32 version to the current version.
To do so, go to your website's gemfile.lock file
Find the line that says yajl-ruby (1.1.0-x86-mingw32)
and change it to yajl-ruby (1.2.1)
or the respective version you downloaded
Step 4
That's it. It should work now.
Yajl itself is a “small event-driven (SAX-style) JSON parser written in ANSI C.” You are supposed to install it on your Windows box (I’m not sure if there are binary downloads available, possibly you are to download sources and compile them with your preferred C compiler) before trying to install yajl-ruby gem, which is simply the binding to it.
Another option is to install Ruby development kit, refer to this manual for detailed explanation.
I've looked at several answers regarding this problem and none seem to do the trick. This is on windows and I am lost for ideas. Thanks for the help!
C:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt_ext.rb:2:in require': cannot load such fil
e -- 2.0/bcrypt_ext (LoadError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt_ext.rb:2:in'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt.rb:12:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require
'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:inblock in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:inrequire'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in require'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/config/application.rb:12:in'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/config/environment.rb:2:in require'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/config/environment.rb:2:in'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/spec/spec_helper.rb:3:in require'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/spec/spec_helper.rb:3:in'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/spec/models/user_spec.rb:1:in require'
from C:/Users/Natecraft/Documents/railstut/Nate_Enddy_d3/blog/spec/models/user_spec.rb:1:in'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/configuration.rb:896:in load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/configuration.rb:896:inblock in load
_spec_files'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/configuration.rb:896:in each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/configuration.rb:896:inload_spec_fil
es'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/command_line.rb:22:in run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/runner.rb:80:inrun'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.3/lib/rspec/core/runner.rb:17:in `block in autorun'
I just solved the same problem on my project.
The problem is that in version 3.1.1 the method 'has_secure_password' is not supported, so calling it in your model while in version 3.1.1 will not work.
However, as mentioned here -> bcrypt error: Devise ruby 2.0 and rails 4.0, simply specifying a version in the gemfile won't work, because a windows compatible version will be used, which causes it's own issues.
My solution was to fork the bcrypt-ruby's github repo, then roll it back to 3.0.1 version and use that as the source for the gem, like this:
gem 'bcrypt-ruby', git: 'git#github.com:hananamar/bcrypt-ruby.git', :require => 'bcrypt'
You're invited to use my repo :)
Hopefully these issues will be fixed soon.
I am trying to get Jekyll working on Windows and am having no luck. This is the first time I've installed/used Ruby.
Ruby version: ruby 2.0.0p0 (2013-02-24) [i386-mingw32] (http://rubyinstaller.org/)
Jekyll version: jekyll 1.0.1
The error goes away when I set pygments to false in _config.yml.
Error message
D:\Code\Jekyll\test>jekyll serve
Configuration file: D:/Code/Jekyll/test/_config.yml
Source: D:/Code/Jekyll/test
Destination: D:/Code/Jekyll/test/_site
Generating... Liquid Exception: cannot load such file -- yajl/2.0/yajl in 2013-05-11-welcome-to-jekyll.markdown
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl/yajl.rb:2:in `<top (required)>'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/yajl-ruby-1.1.0-x86-mingw32/lib/yajl.rb:1:in `<top (required)>'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.4.2/lib/pygments/popen.rb:3:in `<top (required)>'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/pygments.rb-0.4.2/lib/pygments.rb:1:in `<top (required)>'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/tags/highlight.rb:52:in `render_pygments'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/tags/highlight.rb:45:in `render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:106:in `block in render_all'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:93:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:93:in `render_all'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/block.rb:82:in `render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/template.rb:124:in `render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/liquid-2.5.0/lib/liquid/template.rb:132:in `render!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/convertible.rb:77:in `render_liquid'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/convertible.rb:128:in `do_layout'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/post.rb:285:in `render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/site.rb:230:in `block in render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/site.rb:229:in `each'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/site.rb:229:in `render'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/site.rb:44:in `process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/command.rb:18:in `process_site'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/commands/build.rb:23:in `build'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/lib/jekyll/commands/build.rb:7:in `process'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-1.0.1/bin/jekyll:83:in `block (2 levels) in <top (required)>'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/runner.rb:66:in `run!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/delegates.rb:7:in `run!'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'
Build Failed
I did following
gem install rouge
and then
added following line in the _config.yml
highlighter: rouge
I found this solution from following page's comment thread
https://github.com/jekyll/jekyll-help/issues/50
The problem was as #scriptin mentioned in the comments.
I installed ruby v 1.9.3 instead and it solved my problem.
simply add the following line in the _config.yml
highlighter: false
Now browse to localhost:4000
I encountered a similar problem today when trying to setup Octopress/Jekyll.
Here is the solution I found.
Step 1
Go to your ruby gems directory.
In my case it's located at C:/Ruby21/lib/ruby/gems/2.1.0/gems
Look for yajl.
You will see a folder called yajl-ruby-1.1.0-x86-mingw32
You may or may not see one called yajl-ruby-1.2.1
The one with a -ruby-1.1.0-x86-mingw32 tail is the default. And leads to the error.
What we want to use is the other version
Step 2
If you do not have the none mingw32 version, run
gem install yajl-ruby
This will install the latest version.
In my case the latest version was 1.2.1
Step 3
Change the default from the mingw32 version to the current version.
To do so, go to your website's gemfile.lock file
Find the line that says yajl-ruby (1.1.0-x86-mingw32)
and change it to yajl-ruby (1.2.1)
or the respective version you downloaded
Step 4
That's it. It should work now.
You can work round it by manually editing the file that is giving the error to look like this.
RUBY_VERSION =~ /(\d+.\d+)/
require "yajl"
The other proposed solutions appear to either turn off code highlighting, or set it to use Rouge instead of Pygments. I need to use Pygments due to its greater language support.
As described in https://github.com/brianmario/yajl-ruby/issues/116, this issue happens because the precompiled yajl will not work with Ruby 2.0. It needs to be compiled. To make this work so that you can use pygments:
Uninstall the precompiled yajl-ruby gem.
Install it using the syntax shown in that github thread. Note that you may need to specify the version. In my case, Jekyll specifically wanted 1.1.0, so I installed using this syntax:
gem install yajl-ruby --platform=ruby --version=1.1.0
After doing this, Jekyll worked without disabling code highlighting or switching to Rouge.
Install Yajl 1.2.0. Seems to be a bug with 1.2.1.
gem install yajl-ruby --version=1.2.0 --platform=ruby
problem solved.
I'm not sure if the platform part is important like others believe, but this worked for me.