Installing rails on Ubuntu Bash Windows 10

I am using Windows 10 Insider built-in with Bash enabled. lsb_release shows Ubuntu 14.04 LTS. So, I was wondering if I can install RoR on Windows 10 and not use other installers. Because they talk about Ubuntu on Windows.

I follow the GoRails Guide from Chris Oliver to install RoR on Ubuntu 14.04 Win10. I tried using both methods with RVM and Rbenv, but in the end I got errors

I also asked Chris to write a guide for this on his website, and he thought it would be a great idea, but his only concern was to open ports from Linux Software to Windows and connect to it.

I'm sure someone will soon find a way to install rails in Windows 10, but for now I want to find out if this is possible or not? If so, what am I doing wrong. Help me fix it. Also, what should I use for this RVM or RBENV. What would be better in this case?

(Note. Please let me know if this looks like two different questions. I will edit it. I don’t even know if this is possible or not. Bug fixes are a later part.)

Here are the rbenv error messages:

 $ rbenv install 2.3.0 Downloading ruby-2.3.0.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2 Installing ruby-2.3.0... BUILD FAILED (Ubuntu 14.04 using ruby-build 20160426-12-gf03f7f8) Inspect or clean up the working tree at /tmp/ruby-build.20160513120821.313 Results logged to /tmp/ruby-build.20160513120821.313.log Last 10 log lines: rm -f ../../../.ext/x86_64-linux/io/wait.so *.o *.bak mkmf.log .*.time rm -f Makefile extconf.h conftest.* mkmf.log rm -f core ruby *~ rmdir --ignore-fail-on-non-empty -p 2> /dev/null || true make[2]: Leaving directory `/tmp/ruby-build.20160513120821.313/ruby-2.3.0/ext/io/wait' make[1]: Leaving directory `/tmp/ruby-build.20160513120821.313/ruby-2.3.0' Generating RDoc documentation ./ruby is not found. Try `make' first, then `make test', please. make: *** [rdoc] Error 1 

RVM Error Messages:

 -> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2 Installing ruby-2.3.0... BUILD FAILED (Ubuntu 14.04 using ruby-build 20160426-12-gf03f7f8) Inspect or clean up the working tree at /tmp/ruby-build.20160513120821.313 Results logged to /tmp/ruby-build.20160513120821.313.log Last 10 log lines: rm -f ../../../.ext/x86_64-linux/io/wait.so *.o *.bak mkmf.log .*.time rm -f Makefile extconf.h conftest.* mkmf.log rm -f core ruby *~ rmdir --ignore-fail-on-non-empty -p 2> /dev/null || true cooldudeabhi@ACERASPIRE :~$ rvm install 2.3.0 ruby-2.3.0 - #removing src/ruby-2.3.0.. Searching for binary rubies, this might take some time. Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.3.0.ta r.bz2 Checking requirements for ubuntu. Requirements installation successful. df: Warning: cannot read table of mounted file systems: No such file or director y ruby-2.3.0 - #configure ruby-2.3.0 - #download ruby-2.3.0 - #validate archive cat: /dev/fd/63: No such file or directory cat: /dev/fd/63: No such file or directory The downloaded package for https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby -2.3.0.tar.bz2, Does not contains single 'bin/ruby' or 'ruby-2.3.0', Only '' were found instead. Mounting remote ruby failed with status 4, trying to compile. df: Warning: cannot read table of mounted file systems: No such file or director y Checking requirements for ubuntu. Requirements installation successful. grep: write error: Broken pipe sort: fflush failed: standard output: Broken pipe sort: write error Installing Ruby from source to: /home/cooldudeabhi/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)... ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your co nnection... ruby-2.3.0 - #extracting ruby-2.3.0 to /home/cooldudeabhi/.rvm/src/ruby-2.3.0..rvm install 2.3.0 
+6
source share
1 answer

It seems that this is not possible with build 14342 , since this is a problem with Bash in Windows itself [1] .

It is reported that some internal testing builds can install ruby ​​through RVM, but it seems that none of these collections are currently available for a β€œquick” call to Windows Insiders at this time [2] .


Update: 2016-05-27

One step closer: Build 14352 was released on 2016-05-26 [3] . After running apt-get update && apt-get upgrade I was able to successfully install ruby-2.3.1 using both rvm and rbenv.

As noted in source # 1 below, to fully use rvm, I needed to run Bash with /bin/bash --login . To achieve this, I added it to the Bash field in Ubuntu on the Windows shortcut shortcut, like this:

C:\Windows\System32\bash.exe -c "cd ~ && /bin/bash --login"

Now I can rvm use ruby-2.3.1 --default , gem install rails and rails new banana , however, when the programmer tries to start, an error occurs:

 dozers@DRAGONSTONE :~/banana$ bundle --- ERROR REPORT TEMPLATE ------------------------------------------------------- ... Error details ArgumentError: parent directory is world writable but not sticky /home/dozers/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:93:in `ensure in mktmpdir' /home/dozers/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tmpdir.rb:95:in `mktmpdir' /home/dozers/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb:29:in `update' ... --- TEMPLATE END ---------------------------------------------------------------- Unfortunately, an unexpected error occurred, and Bundler cannot continue. First, try this link to see if there are any existing issue reports for this error: https://github.com/bundler/bundler/search?q=parent+directory+is+world+writable+but+not+sticky&type=Issues 

Update: 2016-06-03

It is reported that the error cat: /dev/fd/63: No such file or directory fixed in the upcoming version of Windows Insider [4] , but this does not seem fatal.

As a temporary workaround for a bundle error, issuing chmod -R +t ~/.bundle/cache seems to do the trick, and now you have the installation of working rails [5] .


Sources:

+12
source

All Articles