Re: [Rails] Rake tasks

2014-11-24 Thread Jason Fleetwood-Boldt
Robert, I can't tell you all the ins and outs of your script but what you're seeing here is that rake is looking at the V thinking it is another rake task you want to run (that's why the first one succeeds and then gives you the error) You probably want something like V=true or V=1 or

Re: [Rails] Rake tasks

2014-11-19 Thread Robert Fitzpatrick
Jason Fleetwood-Boldt wrote: Without seeing the task I can't tell you the answer to that. And the fact that it runs on a cron schedule means that you probably have something like a worker in the background doing that. Normally you run rake some_task X=abc Y=xyz I see this piece of code at

Re: [Rails] Rake tasks

2014-11-19 Thread Scott Ribe
On Nov 19, 2014, at 10:49 AM, Robert Fitzpatrick rob...@webtent.org wrote: Then the code uses '#puts something if @verbose' throughout. Like I said, I'm new to ruby, but have used Perl and PHP and other languages before, I hope is what is throwing me off is the # are not comments? This

Re: [Rails] Rake tasks

2014-11-19 Thread Robert Fitzpatrick
Scott Ribe wrote: On Nov 19, 2014, at 10:49 AM, Robert Fitzpatrickrob...@webtent.org wrote: Then the code uses '#puts something if @verbose' throughout. Like I said, I'm new to ruby, but have used Perl and PHP and other languages before, I hope is what is throwing me off is the # are not

Re: [Rails] Rake tasks

2014-11-19 Thread Scott Ribe
On Nov 19, 2014, at 11:12 AM, Robert Fitzpatrick rob...@webtent.org wrote: OK, that's a relief that I can read the code, thanks for clarifying. To get verbosity, I'll need to do a lot of uncommenting and do line-by-line debuggging :-/ Jason mentioned a debugging tool for Rails 2.0

Re: [Rails] Rake tasks

2014-11-19 Thread Robert Fitzpatrick
Scott Ribe wrote: On Nov 19, 2014, at 11:12 AM, Robert Fitzpatrickrob...@webtent.org wrote: OK, that's a relief that I can read the code, thanks for clarifying. To get verbosity, I'll need to do a lot of uncommenting and do line-by-line debuggging :-/ Jason mentioned a debugging tool for

Re: [Rails] Rake tasks

2014-11-19 Thread Robert Fitzpatrick
Robert Fitzpatrick wrote: Maybe I missed something earlier in the discussion, but can't you just edit it to: @verbose = true if arg == 'V' Yes, I guess so, and then uncomment all the places in the code where he has #puts something if @verbose I'll give it a try, still trying to figure

Re: [Rails] Rake tasks

2014-11-18 Thread Michael Riley
Hello, What are the deprecated messages you are getting? Mike Riley On Tue, Nov 18, 2014 at 1:31 PM, Robert Fitzpatrick rob...@webtent.org wrote: I am new to ruby and maintaining an existing web application. I need to change the FTP server in a task and trying to familiarize myself with rake

Re: [Rails] Rake tasks

2014-11-18 Thread Jason Fleetwood-Boldt
Robert, 1) The same deprecation warnings probably happen when you just run rails c or rails s, right? If so, those are just general deprecation warnings that are happening when you boot up the app. Today, you can ignore them (hence, warning). In the long run, you'll want to fix those as you

Re: [Rails] Rake tasks

2014-11-18 Thread Robert Fitzpatrick
Jason Fleetwood-Boldt wrote: Finally, you probably almost certainly don't want to be running RAILS_ENV=production if you are developing locally on your own machine. And learn to use a debugger-- I recommend byebug if you're using Ruby 2.0 or above, and put byebug at the top of your rake task.

Re: [Rails] Rake tasks

2014-11-18 Thread Jason Fleetwood-Boldt
Without seeing the task I can't tell you the answer to that. And the fact that it runs on a cron schedule means that you probably have something like a worker in the background doing that. Normally you run rake some_task X=abc Y=xyz where X and Y are arguments being passed in. But note