質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

0回答

398閲覧

[rails]作成中のファイルが開けなくなった、rails newもできない。sshはできる

seen

総合スコア49

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2017/12/17 06:11

編集2017/12/18 13:17

windowsの更新をしてから仮想サーバ「のvirtualBoxが開かなくなってしまい、windowsの設定から「以前のバージョンに回復する」の操作をしたところvirtualBoxは開けるようになりました。 しかし今度は作成中のファイルがmobaXtermから開けなくなりました。rails newもできません。 回復の作業をする前にやったこととして

  • virtualBoxの再インストール
  • vagrantの再インストール

です。 
エラー内容の中には
コマンドプロンプトでは(エラーではないと思う)

  • ubuntu/trasty32'の最新版が利用できることやvirtualBoxのバージョンでホスト側とゲスト側が異なる件(これで使えていた)

mobaXtermでは

  • rubyのバージョン2.3.0が動作しないような(?)感じにみえます(これで使えていた) 
  • cd ファイル名と行くと No such file or directory となります

何がおかしいのかわからず困っています。 わかる方、お力をかしていただけないでしょうか。 
よろしくお願いします。

環境

  • windows10
  • virtualBox5.1.18
  • vagrant1.8.6
  • MobaXterm10.2.0.0
  • ruby2.3.3
  • rails5.0.3

エラー内容<コマンドプロンプト>

vagrant>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: A newer version of the box 'ubuntu/trusty32' is available! You currently
==> default: have version '20170330.0.1'. The latest is version '20171208.0.0'. Run
==> default: vagrant box update to update.
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 3000 (guest) => 3000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
[default] GuestAdditions versions on your host (5.1.16) and guest (5.1.18) do not match.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
linux-headers-3.13.0-115-generic is already the newest version.
The following packages were automatically installed and are no longer required:
acl at-spi2-core colord dconf-gsettings-backend dconf-service libasound2
libasound2-data libatk-bridge2.0-0 libatspi2.0-0 libcanberra-gtk3-0
libcanberra-gtk3-module libcanberra0 libcolord1 libcolorhug1 libdconf1
libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri
libgl1-mesa-glx libglapi-mesa libgphoto2-6 libgphoto2-l10n libgphoto2-port10
libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2
libieee1284-3 libllvm3.4 libnotify-bin libnotify4 libogg0 libpciaccess0
libsane libsane-common libtdb1 libtxc-dxtn-s2tc0 libv4l-0 libv4lconvert0
libvorbis0a libvorbisfile3 libwayland-client0 libwayland-cursor0 libx11-xcb1
libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1
libxfont1 libxkbcommon0 libxkbfile1 libxmu6 libxshmfence1 libxtst6
libxxf86vm1 notification-daemon sound-theme-freedesktop x11-xkb-utils
xfonts-base xfonts-encodings xfonts-utils xserver-common xserver-xorg-core
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 128 not upgraded.
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
stdin: is not a tty
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only
Installing Virtualbox Guest Additions 5.1.16 - guest version is 5.1.18
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.16 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.18 of VirtualBox Guest Additions...
vboxadd-service.sh: Stopping VirtualBox Guest Addition service.
vboxadd.sh: Stopping VirtualBox Additions.
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.
stdin: is not a tty
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.
stdin: is not a tty
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
Unmounting Virtualbox Guest Additions ISO from: /mnt
stdin: is not a tty

==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/shn/Desktop/work/vagrant
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

: No such file or directory

C:\Users\shn\Desktop\work\vagrant>vagrant ssh
ssh executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/Users/shn/Desktop/work/vagrant/.vagrant/machines/default/virtualbox/private_key

C:\Users\shn\Desktop\work\vagrant>

エラー内容<MobaXterm>

vagrant@vagrant-ubuntu-trusty-32:~$ cd /vagrant
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ cd shinya
-bash: cd: shinya: No such file or directory
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ ^C
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ cd shinya
-bash: cd: shinya: No such file or directory
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ rails new lesson3
create
/usr/lib/ruby/2.3.0/fileutils.rb:253:in mkdir': Permission denied @ dir_s_mkdir - /vagrant/lesson3 (Errno::EACCES) from /usr/lib/ruby/2.3.0/fileutils.rb:253:in fu_mkdir'
from /usr/lib/ruby/2.3.0/fileutils.rb:227:in block (2 levels) in mkdir_p' from /usr/lib/ruby/2.3.0/fileutils.rb:225:in reverse_each'
from /usr/lib/ruby/2.3.0/fileutils.rb:225:in block in mkdir_p' from /usr/lib/ruby/2.3.0/fileutils.rb:211:in each'
from /usr/lib/ruby/2.3.0/fileutils.rb:211:in mkdir_p' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:51:in block in invoke!'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:116:in invoke_with_conflict_check' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:50:in invoke!'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:95:in action' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:14:in empty_directory'
from /var/lib/gems/2.3.0/gems/railties-5.0.3/lib/rails/generators/app_base.rb:153:in create_root' from (eval):1:in create_root'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in block in invoke_all' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in each'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in map' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in invoke_all'
from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/group.rb:232:in dispatch' from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in start'
from /var/lib/gems/2.3.0/gems/railties-5.0.3/lib/rails/commands/application.rb:17:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /var/lib/gems/2.3.0/gems/railties-5.0.3/lib/rails/cli.rb:14:in <top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require' from /var/lib/gems/2.3.0/gems/railties-5.0.3/exe/rails:9:in <top (required)>'
from /usr/local/bin/rails:22:in load' from /usr/local/bin/rails:22:in <main>'
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ ^C
vagrant@vagrant-ubuntu-trusty-32:/vagrant$ ^C
vagrant@vagrant-ubuntu-trusty-32:/vagrant$

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問