0
votes

In a rake task I'm writing some puts statements show changes while others don't. For instance changing

puts model+" | "+id

into

puts model+" * "+id

doesn't change in the output of the script. However in some places changing

puts "Connecting to "+site

into

puts "Connecting to ----"+site

shows the changes that where made.

In the places where any changes to the line doesn't change the output, adding a new puts statement before or after don't show up when the task is run. Commenting out lines of code around the unchanging puts statements that do the actual work cause the script to not execute those lines, just as it should, but changing or adding puts statements there do not change the output of the script.

Removing all other tasks and emacs backup files from the lib/tasks folder doesn't help. I've been bitten before by having a backup copy of a task with the same namespace and task name running instead of the one I was working on.

This is being run with Ruby 2.4.3 on OpenBSD 6.3-stable on a fx-8350. I would post the whole script but the company I'm working for won't allow it.

1

1 Answers

0
votes

How about

puts "#{model} +/*/whatever #{site}"

It shouldn't matter to what sounds like a filesystem update issue (reboot), but it's probably better form to put the variables in the string like that instead of + "" them.