質問編集履歴
1
vagrant upした際のメッセージ、vagrant fileを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,133 @@
|
|
39
39
|
mac os:Mojave バージョン10.14.6
|
40
40
|
|
41
41
|
Virtualbox、Vagrantを使用しています。
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
vagrant upをした際には以下のメッセージが表示されます。(起動していると言う意味だと思います。)
|
46
|
+
|
47
|
+
default: flag to force provisioning. Provisioners marked to run always will still run.
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
vagrant fileの中身は以下の通りです。
|
52
|
+
|
53
|
+
-*- mode: ruby -*-
|
54
|
+
|
55
|
+
vi: set ft=ruby :
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
All Vagrant configuration is done below. The "2" in Vagrant.configure
|
60
|
+
|
61
|
+
configures the configuration version (we support older styles for
|
62
|
+
|
63
|
+
backwards compatibility). Please don't change it unless you know what
|
64
|
+
|
65
|
+
you're doing.
|
66
|
+
|
67
|
+
Vagrant.configure("2") do |config|
|
68
|
+
|
69
|
+
GUEST_RUBY_VERSION = '2.5.7'
|
70
|
+
|
71
|
+
config.vm.box = "centos/7"
|
72
|
+
|
73
|
+
config.vm.box_check_update = false
|
74
|
+
|
75
|
+
config.vm.network "forwarded_port", guest: 3000, host: 3000
|
76
|
+
|
77
|
+
config.vm.network "private_network", ip: "192.168.33.10"
|
78
|
+
|
79
|
+
config.vm.synced_folder "./", "/home/vagrant/work"
|
80
|
+
|
81
|
+
config.ssh.forward_agent = true
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
config.vm.provider "virtualbox" do |vb|
|
86
|
+
|
87
|
+
vb.gui = false
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
config.vm.provision "shell", inline: <<-SHELL
|
94
|
+
|
95
|
+
sudo yum -y install gcc-c++
|
96
|
+
|
97
|
+
sudo yum -y install gettext-devel openssl-devel readline-devel
|
98
|
+
|
99
|
+
echo '### installing nodejs ###'
|
100
|
+
|
101
|
+
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
|
102
|
+
|
103
|
+
sudo yum install -y nodejs
|
104
|
+
|
105
|
+
SHELL
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
config.vm.provision "shell", privileged: false, inline: <<-SHELL
|
110
|
+
|
111
|
+
echo '### installing ImageMagick ###'
|
112
|
+
|
113
|
+
sudo yum install -y openjpeg-devel libjpeg-turbo-devel libtiff-devel libgeotiff-devel libpng-devel giflib-devel libexif-devel libexif libwmf-devel libwmf libtool-ltdl-devel libtool-ltdl lcms-devel
|
114
|
+
|
115
|
+
curl -OL https://www.imagemagick.org/download/releases/ImageMagick-7.0.8-68.tar.gz
|
116
|
+
|
117
|
+
tar -vxf ImageMagick-7.0.8-68.tar.gz
|
118
|
+
|
119
|
+
cd ImageMagick-7.0.8-68/
|
120
|
+
|
121
|
+
./configure
|
122
|
+
|
123
|
+
make
|
124
|
+
|
125
|
+
sudo make install
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
sudo yum install -y sqlite sqlite-devel
|
130
|
+
|
131
|
+
echo '### installing rbenv ###'
|
132
|
+
|
133
|
+
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
|
134
|
+
|
135
|
+
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
|
136
|
+
|
137
|
+
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
|
138
|
+
|
139
|
+
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
|
140
|
+
|
141
|
+
source ~/.bash_profile
|
142
|
+
|
143
|
+
rbenv install #{GUEST_RUBY_VERSION}
|
144
|
+
|
145
|
+
rbenv global #{GUEST_RUBY_VERSION}
|
146
|
+
|
147
|
+
rbenv rehash
|
148
|
+
|
149
|
+
gem install bundler
|
150
|
+
|
151
|
+
gem install rails -v 5.2.3
|
152
|
+
|
153
|
+
gem install sassc
|
154
|
+
|
155
|
+
echo 'You are now on Rails!'
|
156
|
+
|
157
|
+
echo ' o o o o o o o . . . ______________________________ _____=======_||____'
|
158
|
+
|
159
|
+
echo ' o _____ | | | |'
|
160
|
+
|
161
|
+
echo ' .][__n_n_|DD[ ====_____ | | | |'
|
162
|
+
|
163
|
+
echo ' >(________|__|_[_________]_|____________________________|_|_________________|'
|
164
|
+
|
165
|
+
echo ' _/oo OOOOO oo` ooo ooo `o!o!o o!o!o` `o!o o!o` '
|
166
|
+
|
167
|
+
echo ' -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-'
|
168
|
+
|
169
|
+
SHELL
|
170
|
+
|
171
|
+
end
|