teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

新たなエラー

2021/07/04 19:23

投稿

moyasi-
moyasi-

スコア3

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,235 @@
1
1
  Linux環境でrailsの構築をしていたところ下記のエラーが出てきてしまいました。
2
+ ```
2
3
  ```ここに言語を入力
3
4
  $ rails s
4
5
  Your Ruby version is 2.7.0, but your Gemfile specified 2.6.1
5
6
  ```
6
7
  いろいろと調べてはみたのですが一向に解決しません。
7
- どうかよろしくお願いします。
8
+ どうかよろしくお願いします。
9
+
10
+ versionを書き直し、bundle installを実行した結果発生したエラー
11
+ ```ここに言語を入力
12
+ $ bundle install
13
+ Fetching gem metadata from https://rubygems.org/............
14
+ Resolving dependencies...
15
+ Using rake 13.0.3
16
+ Following files may not be writable, so sudo is needed:
17
+ /usr/local/bin
18
+ /var/lib/gems/2.7.0
19
+ /var/lib/gems/2.7.0/build_info
20
+ /var/lib/gems/2.7.0/cache
21
+ /var/lib/gems/2.7.0/doc
22
+ /var/lib/gems/2.7.0/extensions
23
+ /var/lib/gems/2.7.0/gems
24
+ /var/lib/gems/2.7.0/specifications
25
+ Using concurrent-ruby 1.1.9
26
+ Using minitest 5.14.4
27
+ Using websocket-extensions 0.1.5
28
+ Using marcel 1.0.1
29
+ Using mini_mime 1.1.0
30
+ Using erubi 1.10.0
31
+ Using public_suffix 4.0.6
32
+ Using zeitwerk 2.4.2
33
+ Using bundler 2.2.21
34
+ Fetching msgpack 1.4.2
35
+ Fetching bindex 0.8.1
36
+ Using crass 1.0.6
37
+ Using regexp_parser 2.1.1
38
+ Using childprocess 3.0.0
39
+ Fetching nio4r 2.5.7
40
+ Using builder 3.2.4
41
+ Using rb-fsevent 0.11.0
42
+ Using method_source 1.0.0
43
+ Using thor 1.1.0
44
+ Using rubyzip 2.3.0
45
+ Using tilt 2.0.10
46
+ Using semantic_range 3.0.0
47
+ Fetching racc 1.5.2
48
+ Fetching byebug 11.1.3
49
+ Fetching ffi 1.15.3
50
+ Using rack 2.2.3
51
+ Using sqlite3 1.4.2
52
+ Using turbolinks-source 5.2.0
53
+ Using spring 2.1.1
54
+ Using tzinfo 2.0.4
55
+ Using i18n 1.8.10
56
+ Using mail 2.7.1
57
+ Using addressable 2.7.0
58
+ Using selenium-webdriver 3.142.7
59
+ Using rack-test 1.1.0
60
+ Using rack-mini-profiler 2.3.2
61
+ Fetching websocket-driver 0.7.5
62
+ Using rack-proxy 0.7.0
63
+ Using sprockets 4.0.2
64
+ Using turbolinks 5.2.1
65
+ Using activesupport 6.1.4
66
+ Using globalid 0.4.2
67
+ Using activemodel 6.1.4
68
+ Using jbuilder 2.11.2
69
+ Using activejob 6.1.4
70
+ Using activerecord 6.1.4
71
+
72
+
73
+ Your user account isn't allowed to install to the system RubyGems.
74
+ You can cancel this installation and run:
75
+
76
+ bundle config set --local path 'vendor/bundle'
77
+ bundle install
78
+
79
+ to install the gems into ./vendor/bundle/, or you can enter your password
80
+ and install the bundled gems to RubyGems using sudo.
81
+
82
+ Password:
83
+
84
+
85
+ Your user account isn't allowed to install to the system RubyGems.
86
+ You can cancel this installation and run:
87
+
88
+ bundle config set --local path 'vendor/bundle'
89
+ bundle install
90
+
91
+ to install the gems into ./vendor/bundle/, or you can enter your password
92
+ and install the bundled gems to RubyGems using sudo.
93
+
94
+ Password:
95
+ Installing bindex 0.8.1 with native extensions
96
+ Installing websocket-driver 0.7.5 with native extensions
97
+ Installing byebug 11.1.3 with native extensions
98
+ Installing nio4r 2.5.7 with native extensions
99
+ Installing msgpack 1.4.2 with native extensions
100
+ Installing racc 1.5.2 with native extensions
101
+ Installing ffi 1.15.3 with native extensions
102
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
103
+
104
+ current directory: /tmp/bundler20210705-1059-gzagzeracc-1.5.2/gems/racc-1.5.2/ext/racc/cparse
105
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-1gdcw6r.rb extconf.rb
106
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
107
+
108
+ You might have to install separate package for the ruby development
109
+ environment, ruby-dev or ruby-devel for example.
110
+
111
+ extconf failed, exit code 1
112
+
113
+ Gem files will remain installed in /tmp/bundler20210705-1059-gzagzeracc-1.5.2/gems/racc-1.5.2 for inspection.
114
+ Results logged to /tmp/bundler20210705-1059-gzagzeracc-1.5.2/extensions/x86_64-linux/2.7.0/racc-1.5.2/gem_make.out
115
+
116
+ An error occurred while installing racc (1.5.2), and Bundler cannot continue.
117
+ Make sure that `gem install racc -v '1.5.2' --source 'https://rubygems.org/'` succeeds before bundling.
118
+
119
+ In Gemfile:
120
+ rails was resolved to 6.1.4, which depends on
121
+ actioncable was resolved to 6.1.4, which depends on
122
+ actionpack was resolved to 6.1.4, which depends on
123
+ actionview was resolved to 6.1.4, which depends on
124
+ rails-dom-testing was resolved to 2.0.3, which depends on
125
+ nokogiri was resolved to 1.11.7, which depends on
126
+ racc
127
+
128
+
129
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
130
+
131
+ current directory: /tmp/bundler20210705-1059-gkp5h8nio4r-2.5.7/gems/nio4r-2.5.7/ext/nio4r
132
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-5l87mg.rb extconf.rb
133
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
134
+
135
+ You might have to install separate package for the ruby development
136
+ environment, ruby-dev or ruby-devel for example.
137
+
138
+ extconf failed, exit code 1
139
+
140
+ Gem files will remain installed in /tmp/bundler20210705-1059-gkp5h8nio4r-2.5.7/gems/nio4r-2.5.7 for inspection.
141
+ Results logged to /tmp/bundler20210705-1059-gkp5h8nio4r-2.5.7/extensions/x86_64-linux/2.7.0/nio4r-2.5.7/gem_make.out
142
+
143
+ An error occurred while installing nio4r (2.5.7), and Bundler cannot continue.
144
+ Make sure that `gem install nio4r -v '2.5.7' --source 'https://rubygems.org/'` succeeds before bundling.
145
+
146
+ In Gemfile:
147
+ rails was resolved to 6.1.4, which depends on
148
+ actioncable was resolved to 6.1.4, which depends on
149
+ nio4r
150
+
151
+
152
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
153
+
154
+ current directory:
155
+ /tmp/bundler20210705-1059-x387udwebsocket-driver-0.7.5/gems/websocket-driver-0.7.5/ext/websocket-driver
156
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-u3wati.rb extconf.rb
157
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
158
+
159
+ You might have to install separate package for the ruby development
160
+ environment, ruby-dev or ruby-devel for example.
161
+
162
+ extconf failed, exit code 1
163
+
164
+ Gem files will remain installed in /tmp/bundler20210705-1059-x387udwebsocket-driver-0.7.5/gems/websocket-driver-0.7.5
165
+ for inspection.
166
+ Results logged to
167
+ /tmp/bundler20210705-1059-x387udwebsocket-driver-0.7.5/extensions/x86_64-linux/2.7.0/websocket-driver-0.7.5/gem_make.out
168
+ An error occurred while installing websocket-driver (0.7.5), and Bundler cannot continue.
169
+ Make sure that `gem install websocket-driver -v '0.7.5' --source 'https://rubygems.org/'` succeeds before bundling.
170
+
171
+ In Gemfile:
172
+ rails was resolved to 6.1.4, which depends on
173
+ actioncable was resolved to 6.1.4, which depends on
174
+ websocket-driver
175
+
176
+
177
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
178
+
179
+ current directory: /tmp/bundler20210705-1059-qzsws5bindex-0.8.1/gems/bindex-0.8.1/ext/skiptrace
180
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-1a7r67v.rb extconf.rb
181
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
182
+
183
+ You might have to install separate package for the ruby development
184
+ environment, ruby-dev or ruby-devel for example.
185
+
186
+ extconf failed, exit code 1
187
+
188
+ Gem files will remain installed in /tmp/bundler20210705-1059-qzsws5bindex-0.8.1/gems/bindex-0.8.1 for inspection.
189
+ Results logged to /tmp/bundler20210705-1059-qzsws5bindex-0.8.1/extensions/x86_64-linux/2.7.0/bindex-0.8.1/gem_make.out
190
+
191
+ An error occurred while installing bindex (0.8.1), and Bundler cannot continue.
192
+ Make sure that `gem install bindex -v '0.8.1' --source 'https://rubygems.org/'` succeeds before bundling.
193
+
194
+ In Gemfile:
195
+ web-console was resolved to 4.1.0, which depends on
196
+ bindex
197
+
198
+
199
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
200
+
201
+ current directory: /tmp/bundler20210705-1059-otqpqimsgpack-1.4.2/gems/msgpack-1.4.2/ext/msgpack
202
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-17xxby8.rb extconf.rb
203
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
204
+
205
+ You might have to install separate package for the ruby development
206
+ environment, ruby-dev or ruby-devel for example.
207
+
208
+ extconf failed, exit code 1
209
+
210
+ Gem files will remain installed in /tmp/bundler20210705-1059-otqpqimsgpack-1.4.2/gems/msgpack-1.4.2 for inspection.
211
+ Results logged to /tmp/bundler20210705-1059-otqpqimsgpack-1.4.2/extensions/x86_64-linux/2.7.0/msgpack-1.4.2/gem_make.out
212
+ An error occurred while installing msgpack (1.4.2), and Bundler cannot continue.
213
+ Make sure that `gem install msgpack -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling.
214
+
215
+ In Gemfile:
216
+ bootsnap was resolved to 1.7.5, which depends on
217
+ msgpack
218
+
219
+
220
+ Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
221
+
222
+ current directory: /tmp/bundler20210705-1059-tdyhiqbyebug-11.1.3/gems/byebug-11.1.3/ext/byebug
223
+ /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210705-1059-m03g8z.rb extconf.rb
224
+ mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
225
+
226
+ You might have to install separate package for the ruby development
227
+ environment, ruby-dev or ruby-devel for example.
228
+
229
+ extconf failed, exit code 1
230
+
231
+ Gem files will remain installed in /tmp/bundler20210705-1059-tdyhiqbyebug-11.1.3/gems/byebug-11.1.3 for inspection.
232
+ Results logged to /tmp/bundler20210705-1059-tdyhiqbyebug-11.1.3/extensions/x86_64-linux/2.7.0/byebug-11.1.3/gem_make.out
233
+ An error occurred while installing byebug (11.1.3), and Bundler cannot continue.
234
+ Make sure that `gem install byebug -v '11.1.3' --source 'https://rubygems.org/'` succeeds before bundling.
235
+ ```