I'd like to use redgreen (or similar) to colour the output of our tests, but I don't want to force it on everyone else. Is there a way for me to use it without changing our source code?
...
I have over time, changed the size for thumbs of the class Deal. Through these changes, users were uploading to the site, so there are few people who have different sized thumbs. I wanted to reprocress or refresh these, so I went to into my root and typed:
$> rake paperclip:refresh class=Deal
Did nothing for the thumb sizes.. Then I i...
As you may know rake swallows the full backtrace on uncaught exception. If I want to have a full backtrace, I need to add the --trace option. I find this very annoying because some of my tasks take long time to run (up to 6 hours), when it crashes I don't have any debugging info. I need to run it again with the --trace. On top of that,...
Hi,
this might be rather unspecific, but I'm trying to do 'rake test' on a new rails app, and end up with
(in /Users/myname/dev/railstest/RailsApplication1)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/System/Library/Frameworks/...
Can I do the following?
def ModelObserver < ActiveRecord
def after_save
Rake::Task[name].invoke
end
end
At the moment, this returns the following error:
Don't know how to build task 'name'
Any idea?
...
I am populating my Rails database using populator, and I have a case where I would like to build a series of records where fields start_date and end_date follow seamlessly from each other (from today back into the past).
Here is a sample of what I'm doing:
# populate.rake
Chain.populate 1 do |ch|
ch.date_end = DateTime.now
ch.date_...
I want my projects top level Rakefile to build things using rakefiles deeper in the tree; i.e. the top level rakefile says how to build the project (big picture) and the lower level ones build a specific module (local picture).
There is of course a shared set of configuration for the minute details of doing that whenever it can be share...
Hi,
I'm trying to run a cucumber feature multiple times (i.e 500 times). Is there a way of doing this than me having to type in the same command everytime? I'm guessing this can be done using Rake? I'm not an expert in using rake or cucumber.
Will appreciate your help.
Thanks
...
When I execute a rake task manually, it works fine but when I put the same command in Cron nothing happens:
cd /path/to/my/rails/app && rake daily_import
The Cron log indicates that the command was issues:
CMD (cd /path/to/my/rails/app && rake daily_import)
The rake task logs error and success messages, but nothing is recorded to the...
I'm trying to install a Rails app on a Cygwin Rails + WAMP MySQL setup, but rake trows an error :
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Of course, it's trying to connect to MySQL trought a Cygwin socket, and since there's no MySQL server running on Cygwin, it fails.
How do I get Rails to connect to ...
Hi, I'm trying to deploy my rails application with capistrano, but I'm having some trouble running my migrations. In my development environment I just use sqlite as my database, but on my production server I use MySQL.
The problem is that I want the migrations to run from my server and not my local machine, as I am not able to connect t...
I'm trying to get some cron jobs going through Dreamost using their panel. I'm also using rake to execute these jobs
My rake files are located in
app/lib/tasks/example.rake
But I don't know what code to give the panel to execute them
...
I have a rails app with the whenever gem installed to setup cron jobs which invoke various rake tasks. For reasons unbeknownst to me, each rake task gets invoked twice at precisely the same time. So my db backup task backs up the db twice at 4:00am.
Inspecting crontab reveals correct syntax for all of the cron jobs, so I don't think th...
The following is my environment:
OS X 10.5
Xcode 3.1.4
rvm 0.1.38
ruby 1.8.9-p399 (via rvm)
rails 2.3.8
I started getting this error when rake tries to run my tests:
bash$ rake
Virtual timer expired
bash$ # End of output!
And with tracing enabled:
bash$ rake --trace
** Invoke default (first_time)
** Invoke test (first_time)
** E...
Hi Folks,
I am very confused by a sudden problem with running rake tasks:
softwareclick:/myapp/current# rake my_task --trace
(in /myapp/releases/20100621162444)
** Invoke my_task (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `text_area' for class `ActionView::Base'
/myapp/releases...
I'm developing an application using rails 2.3.5, gitorious and deploy with vlad, the OS is Linux Mint 9 Isadora.
vlad:setup and vlad:update are ok.
But when I vlad:migrate and have the same error than if I ssh on the server and try a rake gems:install
rake aborted!
no such file to load -- ya2yaml
/var/www/path/to/releases/2010062...
I'm trying to write a rake task for loadin data into my database. My plan is do something like
system "mysql -u foo -pbar database < backup.sql"
but I need to access the config/database.yml data for getting the user, pass and database info. The trik is I don't want to "parse" this file but to access this info in the same way tasks lik...
As a bonus how do I set this in a config, so that when I log into my production server I don't have to retype it.
...
I'm using the fabulous albacore gem with rake to build a new .NET project. My organization is still using NAnt, and there are lots of folks who expect to see a log file when the build script executes. How do I save the msbuild task output that gets dumped to STDOUT to a log file?
...
Hi,
I've got an rspec test which looks something like this:
require 'require_all'
require_rel '../spec_helper'
describe "HtmlEntities" do
...some tests
end
And I'm invoking it from a rake task that looks like
require 'rspec/core/rake_task'
Rspec::Core::RakeTask.new(:spec) do |spec|
# spec.libs << 'lib' << 'spec'
# spec.spec_file...