<?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: tanakaworld</title>
    <description>The latest articles on DEV Community by tanakaworld (@tanakaworld).</description>
    <link>https://dev.to/tanakaworld</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%2F49851%2Fa407fd81-e63f-48b9-921f-8b2b9bccd4ae.jpg</url>
      <title>DEV Community: tanakaworld</title>
      <link>https://dev.to/tanakaworld</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tanakaworld"/>
    <language>en</language>
    <item>
      <title>How to use bundler 2.x with Docker</title>
      <dc:creator>tanakaworld</dc:creator>
      <pubDate>Sun, 28 Jun 2020 13:55:43 +0000</pubDate>
      <link>https://dev.to/tanakaworld/how-to-use-bundler-2-x-with-docker-42pn</link>
      <guid>https://dev.to/tanakaworld/how-to-use-bundler-2-x-with-docker-42pn</guid>
      <description>&lt;p&gt;You would get an error if there is bundler's version difference between &lt;code&gt;BUNDLED WITH&lt;/code&gt; in &lt;code&gt;Gemfile.lock&lt;/code&gt; and the installed bundler.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/tanakaworld/how-to-resolve-you-must-use-bundler-2-or-greater-with-this-lockfile-2pf7"&gt;https://dev.to/tanakaworld/how-to-resolve-you-must-use-bundler-2-or-greater-with-this-lockfile-2pf7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can resolve the issue by followings.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Update the gem in image &lt;code&gt;gem update --system&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install any version bundler &lt;code&gt;gem install bundler -v &amp;lt;version&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM ruby:2.6.2

ENV APP_HOME /app
WORKDIR $APP_HOME

COPY Gemfile $APP_HOME/Gemfile
COPY Gemfile.lock $APP_HOME/Gemfile.lock

ENV BUNDLER_VERSION 2.1.0
RUN gem update --system \
    &amp;amp;&amp;amp; gem install bundler -v $BUNDLER_VERSION \
    &amp;amp;&amp;amp; bundle install -j 4

COPY . $APP_HOME
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>rails</category>
      <category>docker</category>
    </item>
    <item>
      <title>How to resolve "You must use Bundler 2 or greater with this lockfile"</title>
      <dc:creator>tanakaworld</dc:creator>
      <pubDate>Sun, 28 Jun 2020 13:51:19 +0000</pubDate>
      <link>https://dev.to/tanakaworld/how-to-resolve-you-must-use-bundler-2-or-greater-with-this-lockfile-2pf7</link>
      <guid>https://dev.to/tanakaworld/how-to-resolve-you-must-use-bundler-2-or-greater-with-this-lockfile-2pf7</guid>
      <description>&lt;p&gt;I've written &lt;a href="https://qiita.com/tanakaworld/items/e15ff9dbdd4b628378c2" rel="noopener noreferrer"&gt;the same article&lt;/a&gt; in Japanese.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html" rel="noopener noreferrer"&gt;bundler 2.x has been released&lt;/a&gt; on Jan 4th 2019.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;BUNDLED WITH&lt;/code&gt; in &lt;code&gt;Gemfile.lock&lt;/code&gt; is rewritten when you run &lt;code&gt;bundle update&lt;/code&gt; with bundler 2.x in your machine.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;bundle update
•••

&lt;span class="nv"&gt;$ &lt;/span&gt;git diff
•••
 BUNDLED WITH
-   1.17.3
+   2.0.1


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This change would make some problems on CircleCI and production environment etc.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You must use Bundler 2 or greater with this lockfile.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fqiita-image-store.s3.amazonaws.com%2F0%2F31862%2F4f70933f-4c6c-8293-fd77-a5d1f8e95dce.png" 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%2Fqiita-image-store.s3.amazonaws.com%2F0%2F31862%2F4f70933f-4c6c-8293-fd77-a5d1f8e95dce.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Solution A: Downgrade the bundler
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Check the current version
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;Gemfile.lock | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"BUNDLED WITH"&lt;/span&gt; &lt;span class="nt"&gt;-A&lt;/span&gt; 1&lt;br&gt;
BUNDLED WITH&lt;br&gt;
2.0.1&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Recreate Gemfile.lock with the older version&lt;br&gt;
&lt;/h3&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;bundler &lt;span class="nt"&gt;-v&lt;/span&gt; 1.17.3&lt;br&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;Gemfile.lock&lt;br&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;bundle &lt;em&gt;1.17.3&lt;/em&gt; &lt;span class="nb"&gt;install&lt;/span&gt;&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Confirm&lt;br&gt;
&lt;/h3&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;Gemfile.lock | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"BUNDLED WITH"&lt;/span&gt; &lt;span class="nt"&gt;-A&lt;/span&gt; 1&lt;br&gt;
BUNDLED WITH&lt;br&gt;
1.17.3&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Solution B: Change the bundler version in the environment.&lt;br&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Set any version as &lt;code&gt;BUNDLER_VERSION&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reinstall the bundler&lt;/li&gt;
&lt;/ol&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&lt;p&gt;version: 2&lt;br&gt;
jobs:&lt;br&gt;
  build:&lt;br&gt;
    docker:&lt;br&gt;
      # specify the version you desire here&lt;br&gt;
      - image: circleci/ruby:2.6.0-node-browsers&lt;br&gt;
        environment:&lt;br&gt;
          # 1&lt;br&gt;
          BUNDLER_VERSION: 2.0.1&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  # Specify service dependencies here if necessary
  # CircleCI maintains a library of pre-built images
  # documented at https://circleci.com/docs/2.0/circleci-images/
  # - image: circleci/postgres:9.4

working_directory: ~/repo

steps:
  - checkout

  # 2
  - run:
      name: setup bundler
      command: |
        sudo gem update --system
        sudo gem uninstall bundler
        sudo rm /usr/local/bin/bundle
        sudo rm /usr/local/bin/bundler
        sudo gem install bundler

  # •••

  - run:
      name: install dependencies
      command: |
        bundle install --jobs=4 --retry=3 --path vendor/bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  References&lt;br&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html" rel="noopener noreferrer"&gt;https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discuss.circleci.com/t/using-bundler-2-0-during-ci-fails/27411" rel="noopener noreferrer"&gt;https://discuss.circleci.com/t/using-bundler-2-0-during-ci-fails/27411&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>bundler</category>
    </item>
    <item>
      <title>How to customize the Notification in CKEditor</title>
      <dc:creator>tanakaworld</dc:creator>
      <pubDate>Sun, 28 Jun 2020 13:32:09 +0000</pubDate>
      <link>https://dev.to/tanakaworld/how-to-customize-the-notification-in-ckeditor-9ab</link>
      <guid>https://dev.to/tanakaworld/how-to-customize-the-notification-in-ckeditor-9ab</guid>
      <description>&lt;h2&gt;
  
  
  Premises
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ckeditor/ckeditor5-vue"&gt;ckeditor5-vue&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Customize it via &lt;code&gt;extraPlugins&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;According to &lt;a href="https://ckeditor.com/docs/ckeditor5/latest/api/module_ui_notification_notification-Notification.html#function-showWarning"&gt;documentation&lt;/a&gt;, you can customize notification's behavior like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;ckeditor :config="editorConfig" /&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script lang="ts"&amp;gt;
import Vue from 'vue';
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';


export default Vue.extend({
  components: {
    ckeditor: CKEditor.component,
  },
  data() {
    return {
      editorConfig: {
        extraPlugins: [
          editor =&amp;gt; {
           const notifications = editor.plugins.get('Notification');
           notifications.on('show:warning', (evt, _data) =&amp;gt; {
             evt.stop();
           });
          };
        ],
      },
    };
  },
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>ckeditor5</category>
      <category>ckeditor</category>
    </item>
    <item>
      <title>Who is 'tanakaworld ' ?</title>
      <dc:creator>tanakaworld</dc:creator>
      <pubDate>Wed, 17 Oct 2018 14:40:50 +0000</pubDate>
      <link>https://dev.to/tanakaworld/who-is-tanakaworld---2g0i</link>
      <guid>https://dev.to/tanakaworld/who-is-tanakaworld---2g0i</guid>
      <description>&lt;h1&gt;
  
  
  Hello world :)
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RBNi8ecA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/980uilk5xchu3ktnbqg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RBNi8ecA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/980uilk5xchu3ktnbqg9.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tanaka.world/"&gt;tanakaworld&lt;/a&gt; is a software engineer in japan :-)&lt;/p&gt;

</description>
      <category>tanakaworld</category>
    </item>
  </channel>
</rss>
