Jekyll - Error Running 'Jekyll Serve' - ruby

EDIT: Found the answer (see my answer below!). It involves using version 1.4.2 instead of 1.4.3, so if anyone has any ideas on getting 1.4.3 working, that could be helpful as well. Thanks!
EDIT 2: Thanks to a comment below, it seems that 1.4.3 does have a problem when running on windows. https://github.com/jekyll/jekyll/issues/1948
I have just setup jekyll on my windows 7 computer. I have ruby installed along with the dev pack.
I have run gem install jekyll and that completed with success. I have created a new site as per the jekyll documentation.
The problem I am experiencing happens when I try to run jekyll serve. Please find below the error output.
PS C:\jekyll\test-site> jekyll serve --trace
Configuration file: C:/jekyll/test-site/_config.yml
Source: C:/jekyll/test-site
Destination: C:/jekyll/test-site/_site
Generating... C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Invalid argument - C:/jekyll/test-site/_site/C: (Errno::EINVAL)
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/convertible.rb:168:in `write'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:259:in `block in write'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:397:in `block (2 levels) in each_site_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:396:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:396:in `block in each_site_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:395:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:395:in `each_site_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:259:in `write'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb:41:in `process'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/command.rb:18:in `process_site'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/commands/build.rb:23:in `build'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/commands/build.rb:7:in `process'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/bin/jekyll:97:in `block (2 levels) in <top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:78:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>
I have looked around but am a novice with ruby, so I have no idea what to look for or how to find the error here. Any help would be much appriciated.
Thanks,
Joe

Answering my own question, I managed to find a solution.
This appears to be a problem with Jekyll version 1.4.3. To fix the issue I uninstalled jekyll and installed version 1.4.2.
gem uninstall jekyll
gem install jekyll --version "=1.4.2"
Doing this and everything should work fine if you have the same issue as me on windows.
I guess this is because version 1.4.3 is new (released on 13th) and is unstable on windows.

Just came across the same issue with Jekyll's plugin "Category Archive Generator" (https://github.com/shigeya/jekyll-category-archive-plugin)
Most likely you have a plugin - in the _plugins folder - which is using the File.join() method. e.g. File.join('/', dest, #dir, #category_dir_name, 'index.html')
Modify this by deleting the first element leaving you with File.join(dest, #dir, #category_dir_name, 'index.html')

I had the same problem on Ubuntu Precise 12.04. The issue was that I had ruby1.8 installed. I also had ruby1.9.1 installed. I removed ruby1.8, and then Jekyll installed fine.

Related

Building gem throws IOError

Trying to build a gem like so.
gem build my-awesome-theme.gemspec
And for some unknown reason it's throwing the following error.
/Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `write': closed stream (IOError)
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `close'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `ensure in new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:231:in `block in build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `open'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:111:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/commands/build_command.rb:48:in `execute'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command.rb:305:in `invoke_with_build_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:167:in `process_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:137:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/gem_runner.rb:54:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/bin/gem:21:in `<main>'
Have tried complete rebuild of the ruby environment using RVM, and fresh clone of the gem source from GitHub but the problem persists.
Running Mac OSX, RVM and Ruby 2.3.1
Any help greatly received. :)
Thanks to some help on the #ruby-lang IRC channel I managed to track this issue to an outdated version of rubygems, bumped it from 2.2 to 2.6 and problem appears to have gone away.

Error: `require': cannot load such file -- jemoji (LoadError)

I am using jekyll for the first time.
I downloaded the source code from here. When i run build and run the site using jekyll it runs well. Now I downloaded personal theme from here. After navigating to the downloaded themes folder and then building the new theme doesn't work. I get the following error :
Configuration file: /home/repos/sites/personal-jekyll-theme/_config.yml
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- jemoji (LoadError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/vendor_ruby/jekyll/plugin_manager.rb:28:in `block in require_gems'
from /usr/lib/ruby/vendor_ruby/jekyll/plugin_manager.rb:26:in `each'
from /usr/lib/ruby/vendor_ruby/jekyll/plugin_manager.rb:26:in `require_gems'
from /usr/lib/ruby/vendor_ruby/jekyll/plugin_manager.rb:19:in `conscientious_require'
from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:71:in `setup'
from /usr/lib/ruby/vendor_ruby/jekyll/site.rb:33:in `initialize'
from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:28:in `new'
from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:28:in `process'
from /usr/lib/ruby/vendor_ruby/jekyll/commands/build.rb:17:in `block (2 levels) in init_with_program'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `call'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `block in execute'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `each'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `execute'
from /usr/lib/ruby/vendor_ruby/mercenary/program.rb:42:in `go'
from /usr/lib/ruby/vendor_ruby/mercenary.rb:19:in `program'
from /usr/bin/jekyll:18:in `<main>'
Ruby Verison : ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
Jekyll Version : jekyll 2.2.0
If possible please let me know where and what I am doing wrong. Is there some rule which states that I can locally build only one rule ? As far as I searched I tried changing the port number in config.yml and also tried building different sites with specifying their respective config files. jekyll still doesn't build and gives the same error. Thanks for your help in advance.
I also get the error which is jekyll-feed Load Error
The above issue was resolved following the instructions in readme file and running ./scripts/install.
Thanks #Jordan for your help.

Combination of jekyll-redirect-from and github-metadata gems throwing errors

I am working on a Jekyll site which uses jekyll-redirect-from to redirect old page URLs to their newer equivalents. It builds fine normally, but when I add the GitHub-metadata gem to my gemfile as well and attempt to build my site, I get a fairly unhelpful message:
> bundle exec jekyll build --trace
Configuration file: <site folder>/_config.yml
Source: <site folder>
Destination: <site folder>/_site
Generating...
d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:67:in `join': no implicit conversion of Jekyll::GitHubMetadata::Value into String (TypeError)
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:67:in `redirect_url'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:19:in `block (2 levels) in generate_alt_urls'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:15:in `each'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:15:in `block in generate_alt_urls'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:13:in `each'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:13:in `generate_alt_urls'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-redirect-from-0.8.0/lib/jekyll-redirect-from/redirector.rb:8:in `generate'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:251:in `block in generate'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:250:in `each'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:250:in `generate'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/site.rb:45:in `process'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/command.rb:28:in `process_site'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:55:in `build'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:33:in `process'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/lib/jekyll/commands/build.rb:17:in `block (2 levels) in init_with_program'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from d:/tools/Ruby21-x64/lib/ruby/gems/2.1.0/gems/jekyll-2.4.0/bin/jekyll:18:in `<top (required)>'
from d:/tools/Ruby21-x64/bin/jekyll:23:in `load'
from d:/tools/Ruby21-x64/bin/jekyll:23:in `<main>'
The important part is the no implicit conversion of Jekyll::GitHubMetadata::Value into String (TypeError) section. It seems that somewhere the metadata gem is putting a custom object where the redirect gem expects there to be a string, and as a result it explodes.
If I remove all instances of anything referencing site.github.*, the error still occurs. But if I remove all redirect_froms, the error goes away and it builds successfully. I don't know enough about Ruby or either of these gems to do much troubleshooting past that. It looks like the culprit is this line of redirector.rb in the Jekyll-redirect-from gem.
I have a repro site (very loose definition of "site") at WasabiFan/curly-parakeet. It throws the above error on both Windows and a fresh Ubuntu VM.
What might the problem be? Is there something that must be fixed in one of these gems?
P.S. As a result of this question, I have found a use for GitHub's suggested repo names. Thank you.
I submitted a bug report and they confirmed that this was a bug. I got it fixed in a PR.

jekyll serve --watch command raising an error outside of vagrant

Attempting to build a site with Jekyll using the jekyll-assets gem, I noticed that my changes were not being auto regenerated despite using the --watch flag on my jekyll serve command. Was a big headache having to stop the server every time I wanted to see changes in the browser so I tried to troubleshoot the problem and after a while learned that auto regeneration will not occur with the jekyll serve --watch command in Vagrant, which I'm using.
To avoid this headache I attempted to install necessary dependencies outside of Vagrant and jekyll serve --watch but am getting the following:
Configuration file: /Users/jamestargett/Code/jekyll_fingers/_config.yml
/Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- jekyll-assets (LoadError)
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jamestargett/Code/jekyll_fingers/_plugins/ext.rb:1:in `<top (required)>'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:77:in `block (2 levels) in setup'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:76:in `each'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:76:in `block in setup'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:75:in `each'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:75:in `setup'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/site.rb:29:in `initialize'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/commands/build.rb:5:in `new'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/lib/jekyll/commands/build.rb:5:in `process'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/jekyll-1.4.2/bin/jekyll:97:in `block (2 levels) in <top (required)>'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/runner.rb:66:in `run!'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
from /Users/jamestargett/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
I've tried googling the problem but am pretty new to web development and a little lost.
I've also faced this problem. Looks like its a bug in the newest Jekyll 1.4.2 build. A fix can be uninstalling Jekyll 1.4.2 and installing a stable release, in my knowledge which is 1.2.1
Uninstall Jekyll and reinstall Jekyll 1.2.1 by following these commands
~ $ gem uninstall jekyll
~ $ gem install jekyll --version(="1.2.1")
Running gem install jekyll -v 1.2.1 would also work

Ruby Koans not compatible with Ruby 2.0.0?

After successfully upgrading to Ruby 2.0.0's stable release (yay!) I decided to continue on my Koans Path to Enlightenment. However, when running the rake command within the koans folder, as I normally do, I receive this error:
rake
cd koans
/Users/jordanthornquest/.rvm/rubies/ruby-2.0.0-p0/bin/ruby path_to_enlightenment.rb
/Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:399:in `rescue in meditate': uninitialized constant EdgeCase::Sensei::AssertionError (NameError)
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:407:in `meditate'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:470:in `block in walk'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:481:in `block (3 levels) in each_step'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:479:in `each'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:479:in `block (2 levels) in each_step'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `each'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `each_with_index'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:478:in `block in each_step'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:476:in `catch'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:476:in `each_step'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:469:in `walk'
from /Users/jordanthornquest/programming/ruby-koans/koans/edgecase.rb:491:in `block in <top (required)>'
rake aborted!
Command failed with status (1): [/Users/jordanthornquest/.rvm/rubies/ruby-2...]
/Users/jordanthornquest/programming/ruby-koans/Rakefile:90:in `block in <top (required)>'
/Users/jordanthornquest/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jordanthornquest/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => walk_the_path
I also installed a fresh new Koans batch from GitHub today, as well, to assure that that wasn't my problem. Neither worked for me! It still runs great with 1.9.3. It may be worth noting that I also installed Ruby 2.0 via RVM. I made sure to update to the latest RVM before doing so.
What seems to be the problem?
There is a pull request to fix this, but it has not been accepted yet: https://github.com/neo/ruby_koans/pull/84
For now, you can edit line 149 of src/edgecase.rb to be:
in_ruby_version("1.9", "2.0") do

Resources