<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Leah Suter on Medium]]></title>
        <description><![CDATA[Stories by Leah Suter on Medium]]></description>
        <link>https://medium.com/@leahjs_?source=rss-2d9ec76a49e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YC3WHdT4epoWByDtHoOYOg@2x.jpeg</url>
            <title>Stories by Leah Suter on Medium</title>
            <link>https://medium.com/@leahjs_?source=rss-2d9ec76a49e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:41:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leahjs_/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using the Pismo Gem]]></title>
            <link>https://medium.com/@leahjs_/using-the-pismo-gem-664213e57b50?source=rss-2d9ec76a49e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/664213e57b50</guid>
            <dc:creator><![CDATA[Leah Suter]]></dc:creator>
            <pubDate>Wed, 05 Aug 2015 15:22:08 GMT</pubDate>
            <atom:updated>2015-08-05T15:22:08.864Z</atom:updated>
            <content:encoded><![CDATA[<p>When I purchased a smartphone I was so excited. I loved the new functionality of it and the fact that you have the internet at your finger tips. It was fun learning new things and personalizing the device. Prior to getting the phone, I would surf the web and find interesting articles. Sometimes I would read the articles on my phone. Living in NYC. If I am not at home I am traveling somewhere around the city. The time on the train takes up time while traveling and you are just looking around, reading a physical book or listening to music. So I was curious if there was a way to read the articles while I was on the train. I found Instapaper at first and I kinda liked it then Safari came out with a similar feature but I don’t use Safari often to even remember to use the feature. So I found ReadItLater and I liked it and then they became Pocket. Pocket is now my favorite app because it does one thing and does it well. Pocket allows you to save articles from the internet onto your phone to read offline. In NYC we often idon’thave access to the internet underground so I was elated to find a product that fit my needs and one I like to use.</p><p>With that, I recently learned how to code and as a project I wanted to create a Pocket clone to see how it was done. It was simple until I got up to the part of the show page for each of the links. That I thought would be the most challenging part but it wasn’t. The biggest problem I had was finding a gem and making that gem work.</p><p>The gem I found to be the most useful for this task was Pismo. The documentation is limited but useful. It wasn’t working at first. I received a “cannot load file error” and I searched on the internet on how other people succeeded at fixing the issue. I had it in my gemfile, it loaded correctly on IRB but not Rails console. So after many tries and looking at the source code. I went back to the documentation and it mentioned that it works well on Ruby 2.0.0. I was at 2.2.0. When I downgraded it worked.</p><p>Once it worked I proceeded to add Pismo to my show action in my controller and view.</p><p><em>controllers/weblink_controller.rb</em></p><p>def show</p><p>require ‘pismo’</p><p>@url_id = Weblink.all.find(params[:id])</p><p>@doc = Pismo::Document.new(@url_id.url)</p><p>end</p><p>You don’t have to require ‘pismo’ I just do it for assurance. In this method I am finding the id of the link because I want to display the show page for that specific link and then I am assigning an instance variable to the Pismo Document so I can later access it in the view. I pass in the url from the id.</p><p><em>views/weblinks/show.html.erb</em></p><p>&lt;%= link_to ‘Back’, ‘/mylinks’ %&gt;&lt;br&gt;</p><p>&lt;h1&gt;&lt;%= @doc.title %&gt;&lt;/h1&gt;&lt;br&gt;</p><p>&lt;h5&gt;&lt;a href=”&lt;%= @url_id.url %&gt;”&gt;View Original&lt;/a&gt;&lt;/h5&gt;</p><p>&lt;h4&gt;&lt;%= @doc.body %&gt;&lt;/h4&gt;</p><p>I am using the templating language called ERB. It stands for Embedded Ruby. I added a back button. at the top. Using the @doc variable, I am calling on the title and body method to display the contents of the web page and a link to view the original webpage.</p><p>Now it displays the contents of that page on your show page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=664213e57b50" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>