getURLというrbファイルをexe化しようとすると
以下のメッセージが表示され、exeファイル化されません。
メッセージの各行の意味を教えていただけないでしょうか?
ruby超初心者です。恐れ入りますが、よろしくお願いいたします。
ocraは導入済み windows10 64bitです。
↓エラーメッセージです。
C:\Users\watar\Ruby>ocra getURL.rb === Loading script to check dependencies nil Traceback (most recent call last): 4: from C:/Ruby25-x64/bin/ocra:23:in `<main>' 3: from C:/Ruby25-x64/bin/ocra:23:in `load' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/ocra-1.3.10/bin/ocra:1211:in `<top (required)>' 1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/ocra-1.3.10/bin/ocra:1211:in `load' C:/Users/watar/Ruby/getURL.rb:12:in `<top (required)>': undefined method `post_match' for nil:NilClass (NoMethodError)
↓getURL.rbのコードです
require "open-uri" f = File.open("temp.txt") #temp.txtを開く temp = f.read #temp変数に文字列を代入 f.close #変数postcfに「customfield10109」以降の文字列を代入 cf = /customfield_10109/.match(temp) p cf postcf = cf.post_match p postcf url = postcf.match(%r{https?://[\w_.!*/?=')(-]+}) #postcf文字列からurlを取得 p url File.open("urlname.txt","w") do |text| text.puts(url) end
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。