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

[Rails] Rake tasks

2014-11-18 Thread Robert Fitzpatrick
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 tasks. The task is in lib/tasks/archives.rake under the namespace utils. I read over a rake tutorial and viewed rake options to try and show

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

[Rails] Rake tasks db:test:prepare cannot be executed in the same task of db:reset or db:migrate

2013-02-27 Thread Rafael Sales
Hey all, I'm trying to create a task that prepare the environment to start programming. To do so, I created a task like this *task :setup_env = ['db:reset', 'db:migrate', 'db:test:prepare']* and observed that after execute * rake setup_env*, it never execute db:test:prepare properly. In order to

[Rails] rake tasks

2009-09-20 Thread Thufir
I'm not really creating a rails app, but may integrate this with rails down the road. I've adapted rss2mysql.rb from: Practical Ruby Gems http://www.apress.com/book/view/9781590598115 Chapter 10, parsing feeds but am tweaking everything. Currently I have a rakefile, but am a bit unclear

[Rails] Rake Tasks

2009-06-06 Thread J. D.
Hi Everyone, I just need some further help clarifying a custom rake task I'm building and the logistics of how it should be working. I've created a custom rake task in libs/tasks called scraper.rake which so far just contains the following: desc This task will parse data from ncaa.org and

[Rails] Rake tasks + plugins

2008-09-26 Thread Alexey Skoblikov
In my rake task I try to use the classes and methods defined in a plugin. Seems that plugins are not hooked up during the rake task run. Models are also not hooked up. I can require 'ModelName' I can require 'activerecord' But my Model depends a lot on the plugin (globalize) and initiation of