我有一个只能用ruby发送的报文,执行bot我有一个运行我的ruby文件的二进制文件。最重要的部分是侦听来自用户的新消息。 Telegram::Bot::Client.run(token) do |bot|
bot.listen do |message|
call other methods here
但现在我想从这个简单的红宝石移动项目,对于Rails应用程序,因为我要开始开发更复杂的功
我在我的activejob中提供了一个从zip文件中提取特定文件的函数。以下代码提取空文件。 def extract_file(from, name)
to = get_local_dest(name)
Zip::File.open(from) do |zip_file|
entry = zip_file.glob(name).first
puts ent