質問編集履歴

4

回答へのお返事

2018/08/08 08:45

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -292,4 +292,20 @@
292
292
 
293
293
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
294
294
 
295
+
296
+
295
- ```
297
+ ```
298
+
299
+
300
+
301
+ お二方へ。
302
+
303
+ 数日にわたって回答いただきありがとうございました。
304
+
305
+ お二方の御指示通り、色々試行錯誤してみましたが、何時間もエラーの連発でちょっと疲弊しきっています。
306
+
307
+ 自分には環境構築はまだ早かったということで、クラウドIDEを使ってみようかと思います。
308
+
309
+ 色々調べているうちに、エラーとはちゃんと向き合うべきだという声もたくさんありましたが、環境構築の段階で何日も何時間もかかっているため、このままではプログラミングの学習自体、挫折してしまいそうなので、今回は折れようかと思います。
310
+
311
+ ありがとうございました。

3

Gemfile

2018/08/08 08:45

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -171,3 +171,125 @@
171
171
  # -------------------------------------------
172
172
 
173
173
  ```
174
+
175
+ >dyoshikawaさん
176
+
177
+ 何から何まで無知で申し訳ないです。お手数かけます。
178
+
179
+ これのことでしょうか?
180
+
181
+
182
+
183
+ ```ここに言語を入力
184
+
185
+ [vagrant@localhost sample1]$ cat Gemfile
186
+
187
+ source 'https://rubygems.org'
188
+
189
+
190
+
191
+ git_source(:github) do |repo_name|
192
+
193
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
194
+
195
+ "https://github.com/#{repo_name}.git"
196
+
197
+ end
198
+
199
+
200
+
201
+
202
+
203
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
204
+
205
+ gem 'rails', '~> 5.1.6'
206
+
207
+ # Use sqlite3 as the database for Active Record
208
+
209
+ gem 'sqlite3'
210
+
211
+ # Use Puma as the app server
212
+
213
+ gem 'puma', '~> 3.7'
214
+
215
+ # Use SCSS for stylesheets
216
+
217
+ gem 'sass-rails', '~> 5.0'
218
+
219
+ # Use Uglifier as compressor for JavaScript assets
220
+
221
+ gem 'uglifier', '>= 1.3.0'
222
+
223
+ # See https://github.com/rails/execjs#readme for more supported runtimes
224
+
225
+ gem "rails", "~> 5.1.4"'therubyracer', platforms: :ruby
226
+
227
+
228
+
229
+ # Use CoffeeScript for .coffee assets and views
230
+
231
+ gem 'coffee-rails', '~> 4.2'
232
+
233
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
234
+
235
+ gem 'turbolinks', '~> 5'
236
+
237
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
238
+
239
+ gem 'jbuilder', '~> 2.5'
240
+
241
+ # Use Redis adapter to run Action Cable in production
242
+
243
+ gem "rails", "~> 5.1.4"'redis', '~> 4.0'
244
+
245
+ # Use ActiveModel has_secure_password
246
+
247
+ gem "rails", "~> 5.1.4"'bcrypt', '~> 3.1.7'
248
+
249
+
250
+
251
+ # Use Capistrano for deployment
252
+
253
+ gem "rails", "~> 5.1.4"'capistrano-rails', group: :development
254
+
255
+
256
+
257
+ group :development, :test do
258
+
259
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
260
+
261
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
262
+
263
+ # Adds support for Capybara system testing and selenium driver
264
+
265
+ gem 'capybara', '~> 2.13'
266
+
267
+ gem 'selenium-webdriver'
268
+
269
+ end
270
+
271
+
272
+
273
+ group :development do
274
+
275
+ # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
276
+
277
+ gem 'web-console', '>= 3.3.0'
278
+
279
+ gem 'listen', '>= 3.0.5', '< 3.2'
280
+
281
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
282
+
283
+ gem 'spring'
284
+
285
+ gem 'spring-watcher-listen', '~> 2.0.0'
286
+
287
+ end
288
+
289
+
290
+
291
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
292
+
293
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
294
+
295
+ ```

2

実行結果

2018/08/07 10:43

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -129,3 +129,45 @@
129
129
  - /home/vagrant/bin
130
130
 
131
131
  ```
132
+
133
+
134
+
135
+ >takahashimさん
136
+
137
+ ```ここに言語を入力
138
+
139
+ [vagrant@localhost ~]$ mkdir -p app/samurai/sample1
140
+
141
+ [vagrant@localhost ~]$ cd app/samurai/sample1/
142
+
143
+ [vagrant@localhost sample1]$ bundle init
144
+
145
+ Gemfile already exists at /home/vagrant/app/samurai/sample1/Gemfile
146
+
147
+
148
+
149
+ [vagrant@localhost sample1]$ sed -i 's/ gem "rails"/gem "rails", "~> 5.1.0"/g' Gemfile
150
+
151
+ [vagrant@localhost sample1]$ bundle install --path vendor/bundler
152
+
153
+
154
+
155
+ [!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
156
+
157
+ You specified: rails (~> 5.1.6) and rails (~> 5.1.4therubyracer). Bundler cannot continue.
158
+
159
+
160
+
161
+ # from /home/vagrant/app/samurai/sample1/Gemfile:20
162
+
163
+ # -------------------------------------------
164
+
165
+ # # See https://github.com/rails/execjs#readme for more supported runtimes
166
+
167
+ > gem "rails", "~> 5.1.4"'therubyracer', platforms: :ruby
168
+
169
+ #
170
+
171
+ # -------------------------------------------
172
+
173
+ ```

1

gemfile

2018/08/07 08:10

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -49,3 +49,83 @@
49
49
  よくわからないのは5.1.6です。このバージョンは書き込んだ覚えがないのです。
50
50
 
51
51
  分かる方、教えて頂きたいです。
52
+
53
+
54
+
55
+ >dyoshikawaさん
56
+
57
+ こういうことでよろしいのでしょうか?間違ってたらすみません!
58
+
59
+ ```ここに言語を入力
60
+
61
+ [vagrant@localhost ~]$ gem environment
62
+
63
+ RubyGems Environment:
64
+
65
+ - RUBYGEMS VERSION: 2.6.14.1
66
+
67
+ - RUBY VERSION: 2.4.4 (2018-03-28 patchlevel 296) [x86_64-linux]
68
+
69
+ - INSTALLATION DIRECTORY: /home/vagrant/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0
70
+
71
+ - USER INSTALLATION DIRECTORY: /home/vagrant/.gem/ruby/2.4.0
72
+
73
+ - RUBY EXECUTABLE: /home/vagrant/.rbenv/versions/2.4.4/bin/ruby
74
+
75
+ - EXECUTABLE DIRECTORY: /home/vagrant/.rbenv/versions/2.4.4/bin
76
+
77
+ - SPEC CACHE DIRECTORY: /home/vagrant/.gem/specs
78
+
79
+ - SYSTEM CONFIGURATION DIRECTORY: /home/vagrant/.rbenv/versions/2.4.4/etc
80
+
81
+ - RUBYGEMS PLATFORMS:
82
+
83
+ - ruby
84
+
85
+ - x86_64-linux
86
+
87
+ - GEM PATHS:
88
+
89
+ - /home/vagrant/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0
90
+
91
+ - /home/vagrant/.gem/ruby/2.4.0
92
+
93
+ - GEM CONFIGURATION:
94
+
95
+ - :update_sources => true
96
+
97
+ - :verbose => true
98
+
99
+ - :backtrace => false
100
+
101
+ - :bulk_threshold => 1000
102
+
103
+ - REMOTE SOURCES:
104
+
105
+ - https://rubygems.org/
106
+
107
+ - SHELL PATH:
108
+
109
+ - /home/vagrant/.rbenv/versions/2.4.4/bin
110
+
111
+ - /home/vagrant/.rbenv/libexec
112
+
113
+ - /home/vagrant/.rbenv/plugins/r/bin
114
+
115
+ - /home/vagrant/.rbenv/shims
116
+
117
+ - /home/vagrant/.rbenv/bin
118
+
119
+ - /usr/local/bin
120
+
121
+ - /usr/bin
122
+
123
+ - /usr/local/sbin
124
+
125
+ - /usr/sbin
126
+
127
+ - /home/vagrant/.local/bin
128
+
129
+ - /home/vagrant/bin
130
+
131
+ ```