<?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 Rahul Akurati on Medium]]></title>
        <description><![CDATA[Stories by Rahul Akurati on Medium]]></description>
        <link>https://medium.com/@rakurati?source=rss-e78d56b673d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8FwnQ7VDL4qO-QOd.</url>
            <title>Stories by Rahul Akurati on Medium</title>
            <link>https://medium.com/@rakurati?source=rss-e78d56b673d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 13:53:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rakurati/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[How I started managing time during lockdown between work and family]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rakurati/how-i-started-managing-time-during-lockdown-between-work-and-family-bbb9e0c2f8b1?source=rss-e78d56b673d6------2"><img src="https://cdn-images-1.medium.com/max/2600/1*I158VrbAu6mDIhk6GLZQCQ.jpeg" width="3737"></a></p><p class="medium-feed-snippet">Are you having a challenging time working from home and take care of a kid? Then you are not alone. Check out the strategy I followed&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@rakurati/how-i-started-managing-time-during-lockdown-between-work-and-family-bbb9e0c2f8b1?source=rss-e78d56b673d6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rakurati/how-i-started-managing-time-during-lockdown-between-work-and-family-bbb9e0c2f8b1?source=rss-e78d56b673d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbb9e0c2f8b1</guid>
            <category><![CDATA[lockdown]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[pandemic]]></category>
            <category><![CDATA[work-from-home]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <dc:creator><![CDATA[Rahul Akurati]]></dc:creator>
            <pubDate>Tue, 26 May 2020 07:56:43 GMT</pubDate>
            <atom:updated>2020-05-26T07:56:43.405Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why I switched from Fetch to Axios]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rakurati/why-i-switched-from-fetch-to-axios-e7bc84de8f03?source=rss-e78d56b673d6------2"><img src="https://cdn-images-1.medium.com/max/823/1*DE3nM7v7cSPuY-WN4UocOg.png" width="823"></a></p><p class="medium-feed-snippet">Multi-step to parse result set</p><p class="medium-feed-link"><a href="https://medium.com/@rakurati/why-i-switched-from-fetch-to-axios-e7bc84de8f03?source=rss-e78d56b673d6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rakurati/why-i-switched-from-fetch-to-axios-e7bc84de8f03?source=rss-e78d56b673d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7bc84de8f03</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[axios]]></category>
            <category><![CDATA[fetch-api]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Rahul Akurati]]></dc:creator>
            <pubDate>Thu, 29 Aug 2019 00:24:11 GMT</pubDate>
            <atom:updated>2019-08-29T00:24:11.854Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Integrate Ruby on Rails with VueJS]]></title>
            <link>https://medium.com/@rakurati/integrated-ruby-on-rails-with-vuejs-c375e0c8509d?source=rss-e78d56b673d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c375e0c8509d</guid>
            <category><![CDATA[webpacker]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <dc:creator><![CDATA[Rahul Akurati]]></dc:creator>
            <pubDate>Tue, 25 Sep 2018 18:13:00 GMT</pubDate>
            <atom:updated>2018-09-25T18:13:29.780Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong><br>Every morning, there comes a new JavaScript framework which tries to solve some challenge. If your application is running on a non-JS framework, you must be peaceful not dealing with ton of packages floating around the npm registry. But, there might be a case where you want to build a bridge between your legacy applications and the new JS frameworks. In this post, I would like to go over how I integrated VueJS into the Ruby on Rails.</p><p>Rails (4.x+) started shipping with sprockets, which is a Ruby library to compile and serve static assets (js, css, images etc.). It does great by handling vanilla JavaScript and jQuery stuff, but it can’t handle ES6 version as of date. And this makes it hard to support the frameworks like ReactJS, VueJS etc. as they might contain sections of code written in ES6. One way to go over this is to use Webpacker gem. It is a Ruby version of webpack package, for the JavaScript apps that resides within Rails app. This helps to compile and bundle the JavaScript code (even in ES6), and makes it available as a static assets along with asset pipeline from the sprockets.</p><p><strong>Requirements</strong><br>Since our main focus is to work with Webpacker, the requirements would be the same as they are for that gem. <br>Ruby 2.2+<br>Rails 4.2+<br>Node.js 6.0.0+<br>Yarn 0.25.2+</p><p><strong>Development<br></strong>In this section, I’ll show how I built a small Vue component, and integrated it to a Rails app.</p><p><strong>Building Vue component<br></strong>For this example, as my component is small enough, I had chosen to go with Single File Component (SFC). The component is a simple search bar comprising an input text box, and a button. When user enters some text and clicks on the button (or press enter), it hits an api given as a property to the component and fetches result set. <a href="https://github.com/rahulakurati/vue_search_bar">Here</a> is the git repo for the component.</p><p><strong>Rails App<br></strong>Generate a rails application using standard generator. For my convenience, I’ve used <a href="https://github.com/slim-template/slim">slim gem</a> as templating engine in my rails app, and <a href="https://github.com/rails/webpacker">webpacker gem</a> to integrate with VueJS framework.</p><p>Install the Vue component in the rails app</p><pre>npm install --save https://github.com/rahulakurati/vue_search_bar</pre><p>The above command should install the vue component to the rails app, and respective entry should be there in the project’s package.json file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*5lUD-fPRQMbXnHtxqH9eLA.png" /><figcaption>Rails app’s package.json after installing vue component</figcaption></figure><p>Rails webpacker gem sets up a directory at app/javascriptto host all the related Javascript files for the components. This is different than the one which rails ships by default for the asset pipeline, which is at app/assets.</p><p>I created a search_box.js file in the app/javascript/packs directory to load the Vue component which we installed earlier and bind it to the window object.</p><pre>import Vue from &#39;vue/dist/vue.esm&#39;<br>import SearchBox from &#39;vue_search_bar/src/SearchBox&#39;</pre><pre>window.loadSeachBoxComponent = function() {<br> new Vue({<br>           el: &#39;#searchbox&#39;,<br>           components: {&#39;search-box&#39;: SearchBox}<br> });<br>};</pre><p>Head over to the slim file where you want the component to be rendered. In this example, I have a partial file _header.html.slim where I want to render my Vue component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKQfLwVYnBk0Ni65tFSM9g.png" /><figcaption>Rails Slim file with Vue component</figcaption></figure><p>In line#4, I included the vue component by following the slim’s syntax. In line#9, the javascript function which we created earlier is called, to load the Vue Instance of the component and bind it to div having id as #searchbox in line#3.</p><p>Now the rails app is ready to render the Vue component. Run rails s command to start the rails application on localhost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UZTGV4uG2G9YYADo6uL48A.png" /><figcaption>Rails app</figcaption></figure><p>In the above image, the search bar which says ‘Search by Game’ is our Vue component, and the button to the right which says ‘Add Game User’ is a normal html element.</p><p>In the above example, I just wanted to demonstrate how to use rails Webpacker gem and integrate a rails app with a latest frontend framework like VueJS. Hope it is helpful. Please let me know if any questions by comments.</p><p><strong>Reference</strong><br><a href="https://github.com/rails/webpacker">https://github.com/rails/webpacker</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c375e0c8509d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>