<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matthew D. Groves</title>
    <description>The latest articles on DEV Community by Matthew D. Groves (@mgroves).</description>
    <link>https://dev.to/mgroves</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2826%2F103484.jpeg</url>
      <title>DEV Community: Matthew D. Groves</title>
      <link>https://dev.to/mgroves</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mgroves"/>
    <language>en</language>
    <item>
      <title>Adventures in Yak Shaving: AsciiDoc with Visual Studio Code, Ruby, and Gem</title>
      <dc:creator>Matthew D. Groves</dc:creator>
      <pubDate>Tue, 07 Feb 2017 17:24:08 +0000</pubDate>
      <link>https://dev.to/mgroves/adventures-in-yak-shaving-asciidoc-with-visual-studio-code-ruby-and-gem</link>
      <guid>https://dev.to/mgroves/adventures-in-yak-shaving-asciidoc-with-visual-studio-code-ruby-and-gem</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a repost from Cross Cutting Concerns: &lt;a href="http://crosscuttingconcerns.com/Adventures-in-Yak-Shaving-AsciiDoc-with-Visual-Studio-Code-Ruby-and-Gem" rel="noopener noreferrer"&gt;Adventures in Yak Shaving: AsciiDoc with Visual Studio Code, Ruby, and Gem&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I &lt;a href="http://crosscuttingconcerns.com/AsciiDoc-and-AsciiDocFX" rel="noopener noreferrer"&gt;blogged last year about my switch from Markdown to AsciiDoc&lt;/a&gt;, and that I was using &lt;a href="http://asciidocfx.com/" rel="noopener noreferrer"&gt;AsciiDocFX&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I still like AsciiDoc, but AsciiDocFX has been getting on my nerves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn't have a very good update system. It checks for new versions, but it seems like I have to a) uninstall the old version, b) reinstall the new version, otherwise I get problems. I may be doing it wrong, but this made me want to update less.&lt;/li&gt;
&lt;li&gt;The UI is a little wonky. The live preview sometimes seem to keep its update a few keystrokes behind, meaning that the preview and the document are out of sync. It also tends to get locked up, until I click the Restore button and then Maximize button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still, I used it.&lt;/p&gt;

&lt;p&gt;But, I built a new computer this week. And I've been setting up my softwares on it. I thought it might be worthwhile to see if there's an AsciiDoc plugin for &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;. And, of course there was, because apparently the Code extension ecosystem is booming!&lt;/p&gt;

&lt;p&gt;So, I installed &lt;a href="https://marketplace.visualstudio.com/items?itemName=joaompinto.asciidoctor-vscode" rel="noopener noreferrer"&gt;AsciiDoc by Joao Pinto&lt;/a&gt;, since it came with a live preview. But, it requires me to actually install the asciidoc command line tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcrosscuttingconcerns.blob.core.windows.net%2Fimages%2Fasciidoc%2520prereq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcrosscuttingconcerns.blob.core.windows.net%2Fimages%2Fasciidoc%2520prereq.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See?&lt;/p&gt;

&lt;p&gt;So, I thought, that should be easy enough. I went to the &lt;a href="http://asciidoctor.org/docs/install-toolchain/" rel="noopener noreferrer"&gt;AsciiDoc site&lt;/a&gt; and started following the directions for Windows installation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Ruby&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Okay, well now I need to install Ruby. Should be easy enough. I already have Chocolatey NuGet, so I'll just run &lt;code&gt;choco install ruby&lt;/code&gt;. No problem. I know that ruby comes with gem, so I should be all set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install AsciiDoc&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;According to AsciiDoc... docs... I just use &lt;code&gt;gem install asciidoctor&lt;/code&gt; and that should do the trick.&lt;/p&gt;

&lt;p&gt;But, no. It's not that easy. Otherwise I wouldn't be writing this blog. I got an error message:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I'm sure all you Ruby people or Mac people or whatever already know where this is going, but I had no clue. So I googled it. I found a whole bunch of suggestions on StackOverflow. Some solutions made sense but weren't for Windows, and vice versa. I eventually hit upon &lt;a href="https://gist.github.com/luislavena/f064211759ee0f806c88" rel="noopener noreferrer"&gt;some random guy's Gist and SSL upgrades on rubygems.org&lt;/a&gt; which lead to me&lt;a href="http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages" rel="noopener noreferrer"&gt; this page on rubygems.org about SSL updates&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixing RubyGems Certificate Thingy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, following that literally:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem install --local C:\rubygems-update-2.6.7.gem&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and then&lt;/p&gt;

&lt;p&gt;&lt;code&gt;update_rubygems --no-ri --no-rdoc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and finally&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem uninstall rubygems-update -x&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, I guess that fixed... something? It's described in the gist I linked above. But I don't really understand why it's still a problem for a brand new install of ruby. Not complaining! It worked!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Okay, now Install AsciiDoc&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So now &lt;code&gt;gem install asciidoctor&lt;/code&gt; works. And now I get a live preview of AsciiDoc in Visual Studio Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcrosscuttingconcerns.blob.core.windows.net%2Fimages%2Fasciidoc%2520with%2520visual%2520studio.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcrosscuttingconcerns.blob.core.windows.net%2Fimages%2Fasciidoc%2520with%2520visual%2520studio.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll report back after some more time blogging to see if I like this, or if I eventually go back to AsciiDocFx.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>visualstudio</category>
    </item>
  </channel>
</rss>
