質問編集履歴

1

補足

2018/03/09 08:14

投稿

Sakura25
Sakura25

スコア7

test CHANGED
File without changes
test CHANGED
@@ -2,23 +2,13 @@
2
2
 
3
3
 
4
4
 
5
- ここに質問の内容を詳しく書いてください。
6
-
7
- (例)PHP(CakePHP)●●システム作ってす。
5
+ localhost/3000['サ', 'ク', 'ラ', 'サ', 'ク']をRubyのrandを使用して、ランダム生成し、配列の中から文言を取得させなさと課題を出されたので全く分かりません。 
8
-
9
- ■■な機能を実装中に以下のエラーメッセージが発生しました。
10
-
11
-
12
6
 
13
7
  ### 発生している問題・エラーメッセージ
14
8
 
15
9
 
16
10
 
17
- ```
18
-
19
- エラーメッセージ
20
-
21
- ```
11
+ /Users/sakura/camp/greeting/app/controllers/comments_controller.rb:7: syntax error, unexpected keyword_end end ^~~ /Users/sakura/camp/greeting/app/controllers/comments_controller.rb:11: syntax error, unexpected keyword_end end ^~~ /Users/sakura/camp/greeting/app/controllers/comments_controller.rb:21: syntax error, unexpected '=', expecting ';' or '\n' random = ["サ" , "ク... ^ /Users/sakura/camp/greeting/app/controllers/comments_controller.rb:25: syntax error, unexpected end-of-input, expecting keyword_end
22
12
 
23
13
 
24
14
 
@@ -26,24 +16,18 @@
26
16
 
27
17
 
28
18
 
29
- ```ここに言語名を入力
19
+ ```Ruby,
30
-
31
- ソースコード
32
20
 
33
21
  ```
34
22
 
35
23
 
36
24
 
37
- ### 試したこと
25
+ def
38
26
 
27
+ random = ["サ" , "ク" , "ラ" , "サ" , "ク"]
39
28
 
29
+ @random = Random.new(0..3)
40
30
 
41
- ここに問題に対して試したことを記載してください。
31
+ puts random
42
32
 
43
-
44
-
45
- ### 補足情報(FW/ツールのバージョンなど)
46
-
47
-
48
-
49
- ここにより詳細な情報を記載してください。
33
+ end