<?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: Dan C.</title>
    <description>The latest articles on DEV Community by Dan C. (@otherdcn).</description>
    <link>https://dev.to/otherdcn</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%2F39958%2Fdab0f716-262b-49a8-bb60-389a2a30e589.png</url>
      <title>DEV Community: Dan C.</title>
      <link>https://dev.to/otherdcn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/otherdcn"/>
    <language>en</language>
    <item>
      <title>My simple Ruby mishaps</title>
      <dc:creator>Dan C.</dc:creator>
      <pubDate>Mon, 10 Feb 2020 09:58:32 +0000</pubDate>
      <link>https://dev.to/otherdcn/my-simple-ruby-mishaps-558g</link>
      <guid>https://dev.to/otherdcn/my-simple-ruby-mishaps-558g</guid>
      <description>&lt;p&gt;I ran into a problem installing the latest ruby version - 2.7.0 - at the time of this writing.&lt;/p&gt;

&lt;p&gt;I was using rbenv, so when I ran the following command on my Linux Ubuntu system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rbenv install 2.7.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got the following console output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Downloading ruby-2.7.0.tar.bz2...
-&amp;gt; https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.0.tar.bz2
Installing ruby-2.7.0...

BUILD FAILED (Ubuntu 18.04 using ruby-build 20200115-8-g73b926b)

Inspect or clean up the working tree at /tmp/ruby-build.20200210091058.6452.C1da1m
Results logged to /tmp/ruby-build.20200210091058.6452.log

Last 10 log lines:
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/ruby-build.20200210091058.6452.C1da1m/ruby-2.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My gcc was up-to date and all related libraries were installed, so this was confusing.&lt;/p&gt;

&lt;p&gt;Turns out my problem was simply a ruby script I wrote that interfered with the gcc configurations during installation.&lt;/p&gt;

&lt;p&gt;I wrote a ruby script called ld (list directories), that displayed a list of directories of all my projects grouped into certain environments. I did this so I could simply copy and paste the directory path so I could code in vim. I saved it under [~/bin], which was recommended for user-defined scripts.&lt;/p&gt;

&lt;p&gt;I noticed when I tried to compile a C file, it would display the same output as the ld script. When I browsed through the config.log, in the log it gave the same output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 94 configure:4056: checking whether the C compiler works
 95 configure:4078: gcc  -I/home/user/.rbenv/versions/2.7.0/include  -L/home/user/.rbenv/versions/2.7.0/lib  conftest.c  &amp;gt;&amp;amp;5
 96 /home/user/.rbenv/versions/2.6.1
 97 /home/user/Documents/Coding
 98 /home/user/Documents/Coding/Ruby
 99 /home/user/Documents/Coding/Ruby/practice
100 /home/user/Documents/Coding/Ruby/fun/Ruby-Fun
101 /home/user/Documents/Coding/Ruby/practice/the_well_grounded_rubyist/
102 /home/user/Documents/Coding/Ruby/Rails
103 /home/useruser/Documents/Coding/Ruby/Rails/practice
104 /home/user/Documents/Coding/Ruby/Rails/work
105 /home/useruser/Documents/Coding/Rust
106 /home/user/Documents/Coding/Rust/Practice
107 configure:4082: $? = 0
108 configure:4120: result: no
*Removed for brevity*
126 configure:4125: error: in `/tmp/ruby-build.20200210093603.8012.htWj9f/ruby-2.7.0':
127 configure:4127: error: C compiler cannot create executables
128 See `config.log' for more details
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Line 95 tried to check whether the C compiler works. Line 96 until 106, displayed the output of my ld script. Thus I'm assuming configure resulted to a no.&lt;/p&gt;

&lt;p&gt;I renamed my script, and all was well. I'm not sure if there was a name clash or something, but after renaming it, my problem was solved. A simple script I wrote to help me navigate my directories easily via my terminal gave me a headache for a better part of a day.&lt;/p&gt;

&lt;p&gt;What I learned, and hopefully what you can pick up from this, is to be more vigilant and aware of decisions when configuring user-defined settings not to clash with system-defined settings. A simple solution to a simple problem.&lt;/p&gt;

&lt;p&gt;p.s. After years of being a member, this is my first post. A getting-my-feet-wet kind of post. I finally decided to get out there and share and contribute. I hope to post more on my journey to mastering ruby.&lt;/p&gt;

&lt;p&gt;Au revoir...&lt;/p&gt;

&lt;p&gt;Oz&lt;/p&gt;

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