質問編集履歴

3

k

2020/11/12 11:02

投稿

Meitoku
Meitoku

スコア44

test CHANGED
File without changes
test CHANGED
@@ -132,6 +132,6 @@
132
132
 
133
133
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.js"></script>
134
134
 
135
- <script src="/javascript/packs/main.js"></script>
135
+ <script src="../../javascript/packs/main.js"></script>
136
136
 
137
137
  ```

2

h

2020/11/12 11:02

投稿

Meitoku
Meitoku

スコア44

test CHANGED
File without changes
test CHANGED
@@ -85,3 +85,53 @@
85
85
  <script src="/../../javascript/packs/main.js"></script>
86
86
 
87
87
  ```
88
+
89
+ ##追記
90
+
91
+
92
+
93
+ Vue.jsなのですが、現在{{message}}と記述されしまいます
94
+
95
+ コンソールには以下のエラーです
96
+
97
+ ```
98
+
99
+ Failed to load resource: the server responded with a status of 404 (Not Found)
100
+
101
+ ```
102
+
103
+
104
+
105
+ app/javascript/packs/main.js
106
+
107
+ ```
108
+
109
+ var app = new Vue({
110
+
111
+ el: '#app',
112
+
113
+ data: {
114
+
115
+ message: 'Hello Vue'
116
+
117
+ }
118
+
119
+ })
120
+
121
+ ```
122
+
123
+ app/views/tops/index.html.erb
124
+
125
+ ```
126
+
127
+ <div id="app">
128
+
129
+ {{message}}
130
+
131
+ </div>
132
+
133
+ <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.js"></script>
134
+
135
+ <script src="/javascript/packs/main.js"></script>
136
+
137
+ ```

1

2020/11/12 11:01

投稿

Meitoku
Meitoku

スコア44

test CHANGED
File without changes
test CHANGED
File without changes