在 Ubuntu Bash Windows 上安装 rails 10
Installing rails on Ubuntu Bash Windows 10
我正在使用启用了 Bash 的 Windows 10 Insider。 lsb_release
显示其 Ubuntu 14.04 LTS。所以,我想知道我终于可以在 Windows 10 上安装 RoR 而不是使用其他安装程序。因为他们在 Windows.
上说它是 Ubuntu
我正在关注 Chris Oliver 的 GoRails Guide 在 Ubuntu 14.04 Win10 上设置 RoR。我使用 RVM 和 Rbenv 尝试了这两种方法,但最终出现错误
我还要求 Chris 在他的网站上为此写一个指南,他认为这是个好主意,但他唯一关心的是 在 Linux 上使用 Linux 软件打开端口=34=] 并连接到它
我相信很快就会有人找到在 Windows 10 上安装 rails 的方法,但同时我想知道这是否可行?如果是,我做错了什么。帮我修一下。另外我应该为这个 RVM 或 RBENV 使用什么。在这种情况下哪个更好?
(注意:如果这看起来像两个不同的问题,请告诉我。我会编辑它。我什至不知道它是否可能。修复错误是后面的部分。)
这里是 rbenv 错误信息:
$ 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 错误消息:
-> 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
从构建 14342 开始似乎不可能,因为这是 Windows 上 Bash 的问题本身[1].
据报道,一些内部测试版本能够通过 RVM 安装 ruby,但似乎这些版本目前都无法用于 Windows 的 'fast' 环业内人士此时[2].
更新时间:2016-05-27
更进一步: Build 14352 于 2016-05-26 [3] 发布。在 运行ning apt-get update && apt-get upgrade
之后,我能够使用 rvm 和 rbenv 成功安装 ruby-2.3.1
。
正如下面来源 #1 中所述,为了充分利用 rvm,我需要 运行 bash 和 /bin/bash --login
。为了实现这一点,我将它附加到 Bash on Ubuntu on Windows 快捷方式的目标字段,如下所示:
C:\Windows\System32\bash.exe -c "cd ~ && /bin/bash --login"
现在我可以 rvm use ruby-2.3.1 --default
、gem install rails
和 rails new banana
,但是当捆绑程序尝试 运行 时,出现错误:
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
更新时间:2016-06-03
据报道,cat: /dev/fd/63: No such file or directory
错误将在即将发布的 Windows Insider 版本 [4] 中修复,但这似乎并不致命。
作为捆绑程序错误的临时解决方法,发出 chmod -R +t ~/.bundle/cache
似乎可以解决问题,现在您可以正常工作 rails 安装 [5].
来源:
- https://github.com/Microsoft/BashOnWindows/issues/9#issuecomment-207978726
- https://github.com/Microsoft/BashOnWindows/issues/222#issuecomment-214561156
- https://blogs.windows.com/windowsexperience/2016/05/26/announcing-windows-10-insider-preview-build-14352/
- https://github.com/Microsoft/BashOnWindows/issues/266#issuecomment-219576351
- https://github.com/bundler/bundler/issues/4630#issuecomment-223576426
我正在使用启用了 Bash 的 Windows 10 Insider。 lsb_release
显示其 Ubuntu 14.04 LTS。所以,我想知道我终于可以在 Windows 10 上安装 RoR 而不是使用其他安装程序。因为他们在 Windows.
我正在关注 Chris Oliver 的 GoRails Guide 在 Ubuntu 14.04 Win10 上设置 RoR。我使用 RVM 和 Rbenv 尝试了这两种方法,但最终出现错误
我还要求 Chris 在他的网站上为此写一个指南,他认为这是个好主意,但他唯一关心的是 在 Linux 上使用 Linux 软件打开端口=34=] 并连接到它
我相信很快就会有人找到在 Windows 10 上安装 rails 的方法,但同时我想知道这是否可行?如果是,我做错了什么。帮我修一下。另外我应该为这个 RVM 或 RBENV 使用什么。在这种情况下哪个更好?
(注意:如果这看起来像两个不同的问题,请告诉我。我会编辑它。我什至不知道它是否可能。修复错误是后面的部分。)
这里是 rbenv 错误信息:
$ 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 错误消息:
-> 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
从构建 14342 开始似乎不可能,因为这是 Windows 上 Bash 的问题本身[1].
据报道,一些内部测试版本能够通过 RVM 安装 ruby,但似乎这些版本目前都无法用于 Windows 的 'fast' 环业内人士此时[2].
更新时间:2016-05-27
更进一步: Build 14352 于 2016-05-26 [3] 发布。在 运行ning apt-get update && apt-get upgrade
之后,我能够使用 rvm 和 rbenv 成功安装 ruby-2.3.1
。
正如下面来源 #1 中所述,为了充分利用 rvm,我需要 运行 bash 和 /bin/bash --login
。为了实现这一点,我将它附加到 Bash on Ubuntu on Windows 快捷方式的目标字段,如下所示:
C:\Windows\System32\bash.exe -c "cd ~ && /bin/bash --login"
现在我可以 rvm use ruby-2.3.1 --default
、gem install rails
和 rails new banana
,但是当捆绑程序尝试 运行 时,出现错误:
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
更新时间:2016-06-03
据报道,cat: /dev/fd/63: No such file or directory
错误将在即将发布的 Windows Insider 版本 [4] 中修复,但这似乎并不致命。
作为捆绑程序错误的临时解决方法,发出 chmod -R +t ~/.bundle/cache
似乎可以解决问题,现在您可以正常工作 rails 安装 [5].
来源:
- https://github.com/Microsoft/BashOnWindows/issues/9#issuecomment-207978726
- https://github.com/Microsoft/BashOnWindows/issues/222#issuecomment-214561156
- https://blogs.windows.com/windowsexperience/2016/05/26/announcing-windows-10-insider-preview-build-14352/
- https://github.com/Microsoft/BashOnWindows/issues/266#issuecomment-219576351
- https://github.com/bundler/bundler/issues/4630#issuecomment-223576426