Displaying 20 results from an estimated 80000 matches similar to: "newbi: Save console commands as script (e.g. rake task?)"
2008 Apr 11
0
expiring cache outside controller (e.g. in rake tasks)
Hello,
I need to expire cache outside controller, in my rake tasks. I want to
use standard methods expire_fragment,etc.. but I can''t manage to use
them outside controllers. I tried including
ActiveController::Caching::Actions but didn''t work.
Anyone has any solution? I''m losing my head how to do it... (besides
manually deleting files)
Thanks
Uros
2008 Oct 22
3
Rake task vs script/runner
Hello, until now I allways used script/runner for running Rails cron
jobs
I wonder is there is any benefit (except not having any fake runner
model in the models directory) to use a rake task instead in lib/tasks
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2010 Oct 06
3
Script acting differently inside of rake task
I''ve created a rake task that does various things, one of which is
calling a script. When I call that script from my Rails.root folder,
it works, but it doesn''t work inside my rake task. [This is rails 3]
That is, the following line works from bash:
lib/daemons/mailer_ctl start
However, inside my rake task, this line does not work:
puts `lib/daemons/mailer_ctl start`
The
2008 Jan 01
3
3rdrail run rake task error: no Ruby script found in input (LoadError) (Windows)
Hi, dudes
I got a question here. When I run "rake db:migrate" in 3rdrail, it
throws an error: D:\ruby\bin\ruby.exe: no Ruby script found in input
(LoadError). I have set the ruby interpreter paths, And can''t find the
solution on Google. Any good ideas?
Issac
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2008 Nov 06
8
anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)
anyone able to explain logic behind "rake spec" startup? i.e. the
below steps & why things occur when they do
Macintosh-2:myequity greg$ rake spec --trace
(in /Users/greg/source/myequity)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute
2007 Dec 21
3
Access url_for from rake task
How do I access ActionController:Base url_for method from a Rake task.
I tried to access ActionController from irb but it doesn''t work?
Check out the pasite http://pastie.caboo.se/131266
--
Anil
http://anilwadghule.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2009 Mar 06
2
rake test:functionals -> Task not supported by ''
I have a Rails project in which I''ve been using "rake test" tasks with
great success. At some point (there were a few changes in the interim),
rake started aborting test tasks. Here is the dialog:
===
$ rake test:functionals
(in /Users/fritza/myproject)
rake aborted!
Task not supported by ''''
(See full trace by running task with --trace)
===
The separate
2013 Jul 01
0
Rake task like "rake cache_digests:dependencies" for Rails 4?
The cache_digests gem has the "rake cache_digests:dependencies" task for
checking template dependencies.
Since Rails 4 includes this caching scheme by default, should it include a
similar rake task?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send
2006 Oct 22
0
[705] trunk/wxruby2/rake/rakedocs.rb: Add rake task to publish docs to wxruby website (Alex Fenton)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Mar 21
0
is "Task" a reserved class name in Edge Rails? (it clashes with Rake''s Task)
Ok, so I''ll bet that lots of people would naturally have a DB table called
"Tasks" and a model called Task, and this works fine in Rails 1.0. BUT,
using Edge Rails things turn strange when you start visiting your Task pages
because it thinks that you''re trying to use Rake (which also has a Task
class). Is there any way around this?
-Greg
Greg Edwards
CTO,
2013 Feb 28
0
Rake tasks db:test:prepare cannot be executed in the same task of db:reset or db:migrate
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 get
the schema cloned to test db,
2007 Dec 26
2
How to set environment when calling rake task inside another
This is what I have inside a rake task. In this rake task I need to call
another rake task called email:send_messages. However I need to pass the
RAILS_ENV as ''staging''.
Rake::Task["rake:email:send_messages"].invoke
I tried a lot of variations but none of them work.
Rake::Task["rake:email:send_messages"].invoke RAILS_ENV=staging
2007 Oct 12
0
Speccing a rake task
Greetings,
I''m writing a custom rake task, and I''d like to write an assosciated spec for it.
Does anyone have an example spec for a rake task?
I''ve seen some examples on the web that use these before blocks:
before(:each) do
@rake = Rake::Application.new
Rake.application = @rake
end
And use
@rake["db:user_migration"].invoke
To invoke the
2006 May 09
2
Disabling FOREIGN KEYs in a Rake task
Hi,
How could I disable my database FOREIGN KEYs in a Rake task?
Or, how could I call the execute() method in a Rake task?
I''m trying to perform something like:
task :delete_the_cippalippa => :environment do
require RAILS_ROOT+''/lib/marsian.rb''
# FIXME: execute() is undefined
execute "SET FOREIGN_KEY_CHECKS = 0"
Cippalippa.delete(-1)
2006 Apr 18
0
extend doc:app rake task to Include lib/*?
I''ve never really done much with rake and I''m trying to figure out how
to add some options to the doc:app task. For instance I''d like to
include documentation for files in the lib directory. I can''t seem to
figure out the proper way to do it short of changing the
lib/tasks/documentation.rake in the rails distribution. After poking
around in the rails tasks, I
2006 Aug 11
1
Absolute path to public/images in rake task?
Hi all
I''m trying to create a rake task for the first time, so please be a bit
patient with me. ;-)
I''m coding a photo gallery. Every photo gallery''s photos are in its own
folder, and after an update I''d like to be able to synchronize the photo
files with the database (because every photo has its own Photo class
object). I''ve got so far:
# File
2006 Jun 28
1
Is there a rake task to extract data from a database/table
I know I can get the schema by running
rake db_schema_dump
but, is there a way to ge the data from a table or a database into a format
that can be quickly converted to a migration. What I''m really trying to do
is synch my local development database (schema and data) with the db on my
hosting service.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory
2005 Dec 26
0
Rake (default task) overwrites development database?
I changed the subject to be more appropriate. Any idea why the
development database would be effected?
On 12/26/05, Ryan Wood <ryan.wood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hey all. Hope you can help with this. I was running "rake" to run
> tests on my server we are setting up for production. I''m currently
> entering all my data into the dev
2008 May 26
1
Rake db task
Hello,
just wanted to know how to create a rake db task to populate data into
a database.
Thanks
Joel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group,
2008 Apr 08
2
Can you add an option to select the ruby interpreter for rake task?
Hi all,
My problem is that I''ve installed both ruby 1.8 (as ruby) and
ruby 1.9 (as ruby1.9) on my system. I use spec/rake/spectask for
my Rakefile. But the generated command is
ruby -I.. blabla
it should be "ruby1.9 -I... blabla", but after look at the code
of spectask.rb, I found this line:
==> cmd = "ruby "
rb_opts = ruby_opts.clone