質問編集履歴
1
vagrantfile追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby on rails で共有ファイルの設定ができない
|
1
|
+
vagrantを使ってruby on rails で共有ファイルの設定ができない
|
test
CHANGED
@@ -39,3 +39,157 @@
|
|
39
39
|
|
40
40
|
|
41
41
|
よろしくお願いします。
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
vagrantfileの中身は以下のようになっています。
|
46
|
+
|
47
|
+
```ここに言語を入力
|
48
|
+
|
49
|
+
# -*- mode: ruby -*-
|
50
|
+
|
51
|
+
# vi: set ft=ruby :
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
56
|
+
|
57
|
+
# configures the configuration version (we support older styles for
|
58
|
+
|
59
|
+
# backwards compatibility). Please don't change it unless you know what
|
60
|
+
|
61
|
+
# you're doing.
|
62
|
+
|
63
|
+
Vagrant.configure("2") do |config|
|
64
|
+
|
65
|
+
# The most common configuration options are documented and commented below.
|
66
|
+
|
67
|
+
# For a complete reference, please see the online documentation at
|
68
|
+
|
69
|
+
# https://docs.vagrantup.com.
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# Every Vagrant development environment requires a box. You can search for
|
74
|
+
|
75
|
+
# boxes at https://atlas.hashicorp.com/search.
|
76
|
+
|
77
|
+
config.vm.box = "bento/centos-6.7"
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
# Disable automatic box update checking. If you disable this, then
|
82
|
+
|
83
|
+
# boxes will only be checked for updates when the user runs
|
84
|
+
|
85
|
+
# `vagrant box outdated`. This is not recommended.
|
86
|
+
|
87
|
+
# config.vm.box_check_update = false
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
# Create a forwarded port mapping which allows access to a specific port
|
92
|
+
|
93
|
+
# within the machine from a port on the host machine. In the example below,
|
94
|
+
|
95
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
96
|
+
|
97
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
# Create a private network, which allows host-only access to the machine
|
102
|
+
|
103
|
+
# using a specific IP.
|
104
|
+
|
105
|
+
config.vm.network :private_network, ip: "192.168.33.10"
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
# Create a public network, which generally matched to bridged network.
|
110
|
+
|
111
|
+
# Bridged networks make the machine appear as another physical device on your network.
|
112
|
+
|
113
|
+
# config.vm.network "public_network"
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
# Share an additional folder to the guest VM. The first argument is
|
118
|
+
|
119
|
+
# the path on the host to the actual folder. The second argument is
|
120
|
+
|
121
|
+
# the path on the guest to mount the folder. And the optional third
|
122
|
+
|
123
|
+
# argument is a set of non-required options.
|
124
|
+
|
125
|
+
# config.vm.synced_folder "../data", "/vagrant_data"
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
# Provider-specific configuration so you can fine-tune various
|
130
|
+
|
131
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
132
|
+
|
133
|
+
# Example for VirtualBox:
|
134
|
+
|
135
|
+
#
|
136
|
+
|
137
|
+
# config.vm.provider "virtualbox" do |vb|
|
138
|
+
|
139
|
+
# # Display the VirtualBox GUI when booting the machine
|
140
|
+
|
141
|
+
# vb.gui = true
|
142
|
+
|
143
|
+
#
|
144
|
+
|
145
|
+
# # Customize the amount of memory on the VM:
|
146
|
+
|
147
|
+
# vb.memory = "1024"
|
148
|
+
|
149
|
+
# end
|
150
|
+
|
151
|
+
#
|
152
|
+
|
153
|
+
# View the documentation for the provider you are using for more
|
154
|
+
|
155
|
+
# information on available options.
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
|
160
|
+
|
161
|
+
# such as FTP and Heroku are also available. See the documentation at
|
162
|
+
|
163
|
+
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
|
164
|
+
|
165
|
+
# config.push.define "atlas" do |push|
|
166
|
+
|
167
|
+
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
|
168
|
+
|
169
|
+
# end
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
# Enable provisioning with a shell script. Additional provisioners such as
|
174
|
+
|
175
|
+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
176
|
+
|
177
|
+
# documentation for more information about their specific syntax and use.
|
178
|
+
|
179
|
+
# config.vm.provision "shell", inline: <<-SHELL
|
180
|
+
|
181
|
+
# apt-get update
|
182
|
+
|
183
|
+
# apt-get install -y apache2
|
184
|
+
|
185
|
+
# SHELL
|
186
|
+
|
187
|
+
config.vm.network "forwarded_port", guest: 3000, host:3000
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
```
|