はじめまして、初心者です。
よろしくお願いします。
【開発環境】
・Windows10
・VS Code 1.25.1
・Ruby 2.3.3
・Selenium
・chromedriver
【設定済】
・bundler
・Gemfile
・uru
・devkit
VS Codeをrubyが使えるよう設定しました。
テストのため新規でファイル名「test.rb」をつくり、
サイト(https://qiita.com/masakinihirota/items/ec90086bab86f369fa15
)を参考に、お試しプログラム
class Hello
def hello
puts 'HELLO'
end
end
aisatu = Hello.new
aisatu.hello
を実行したのですが、
[Running]
HELLO
[Done]
のHELLOの部分が表示されません。
エラーの表示はされておらず、原因が分からず困っています。
【以下VS Codeにて設定したもの】
・ユーザー設定
"window.zoomLevel": 0,
"editor.fontFamily": "'Migu 1M'",
"editor.renderWhitespace": "boundary",
"editor.rulers": [80,120],
"editor.minimap.showSlider": "always",
"editor.cursorBlinking": "smooth",
"editor.fontSize": 13,
"editor.tabSize": 2 ,
"files.autoGuessEncoding":true,
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"terminal.integrated.scrollback": 200000,
"ruby.lint": { "rubocop": true },
"explorer.confirmDragAndDrop": false,
"extensions.ignoreRecommendations": true,
"workbench.colorTheme": "Solarized Dark",
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
・拡張機能
Advanced New File
Color Highlight
file-icons
One Dark Pro
Ruby
ruby-robocop
Sass
Slim
Sort lines
GitLens Git
Live Server
Path Intellisense
Settings S
※追記
test.rbファイルを開いた画面の右下にあるRubyというアイコンをクリックして言語モードを設定しました。
RunCodeを実行すると、変化はあったのですが、
[Running] ruby "c:\tools\test.rb"
c:/tools/test.rb:3: syntax error, unexpected tIDENTIFIER, expecting keyword_end
[Done] exited with code=1 in 0.322 seconds
というエラーが表示されました。(言語の最後に構文のエラーを予測?)
現在未解決のままです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/10 09:36
2018/08/10 11:11 編集
2018/08/10 13:30