-1

I'm trying to install ruby on window 10 and having some problems.

First of all I followed the instruction to install ubuntu's bash but after adding the "sublinux system" option on control panel and reinstalled, the bash didn't work at all. It's just turn off immediately when I clicked on it. So I downloaded linux app on Microsoft store, and continue the instruction, then I'm stucked with the ruby installation.

   minhtam@DESKTOP-KJ2L9J7:~$ rbenv install 2.6.3  
   Downloading ruby-2.6.3.tar.bz2...                                                                                                                                       
   -> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2                                                                                                          
   Installing ruby-2.6.3...                                                                                                                                                                                                                                                                                                                        
   BUILD FAILED (Ubuntu 18.04 using ruby-build 20190615-1-g0867187)                                                                                                                                                                                                                                                                                
   Inspect or clean up the working tree at /tmp/ruby- 
   build.20190618055333.4192                                                                                             
   Results logged to /tmp/ruby-build.20190618055333.4192.log                                                                                                                                                                                                                                                                                       
   Last 10 log lines:                                                                                                                                                      
   checking for ruby... false                                                                                                                                              
   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... no                                                                                                                                                  
   checking for cc... no                                                                                                                                                   
   checking for cl.exe... no                                                                                                                                               
   configure: error: in `/tmp/ruby-build.20190618055333.4192/ruby-2.6.3':                                                                                                  
   configure: error: no acceptable C compiler found in $PATH                                                                                                               
   See `config.log' for more details  

I have looked for solutions and installed libssl-dev already but It doesn't help anything.

TamTam
  • 547
  • 1
  • 5
  • 16

1 Answers1

1

You might want to try

sudo apt-get install gcc

If it does not work, try this topic

To summarize

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Also, I want to share my experience about installing and working with RoR & Mysql on Windows here

quyetdc
  • 1,485
  • 1
  • 14
  • 24
  • Thanks for your suporting. I did take a look at that post but still failed. So I think install ubuntu is much more easier for RoR. And after 7 hours struggling, now It worked like a charm !!! :-) – TamTam Jun 18 '19 at 08:37