仮想サーバーを新しく用意した場合、sublimetextなどの製作途中フォルダを入れられますか?
はじめてプログラムを作っているもので全くの素人な質問で申しわかないのですが、この度1年前くらいから作っているプログラムの完成が近かずいたのですが、急に仮想サーバーに入れなくなってしまい困っています。 復旧に全力を尽くしているのですがうまくいかず、仮想環境の作り直しも頭をよぎるようになりました。
普通のホームページも公開したことのないレベルなのですがHTML、CSSはフォルダごとサーバーにアップロードしますよね。 同じようにrailsを書いたフォルダもどの仮想サーバーでも開くことはできるのでしょうか。 それとも仮想サーバーもプログラムの一部と考えて1から作らないと動作しないのでしょうか。 すみませんがお答えいただけると助かります。
追記
sublimetextなどの製作途中フォルダを入れられますか?とはSublimeTextを使って編集しているRubyのコードという意味です。また、仮想サーバとは私のパソコンの中のVirtualBoxやVagrantといった仮想環境のことです。
仮想環境の起動は出来ていると自分自身は認識しています。でも今までとは違うような気もします。SSHの接続にも成功していますがそこから作成中のフォルダが無いとエラーが出ます。rails newも出来ません。
環境
- 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$
回答1件
あなたの回答
tips
プレビュー