rakefile

Is it possible to use in a Rakefile tasks from another one?

I have some Rake tasks I'd like to use in my Rakefiles. Is it possible to include tasks defined in one rakefile from another rakefile? ...

Is there any way to disable Erubis from printing "** Erubis 2.6.5" when starting the Rails environment?

I have several frequent Cron jobs that are run via Rake and the output of those jobs are e-mailed (via a MAILTO). Due to the fact that these tasks load the Rails environment (which includes Erubis) they always prints out "** Erubis 2.6.5" on startup. This means that an e-mail is always generated since Cron receives output. Is there an...

Can a rake task know about the other tasks in the invocation chain?

Rake (like make) is able to have many targets/tasks specified on invocation. Is it possible for a rake task to access the list of tasks the user invoked, in order to do its job? Scenario: Consider a Rake-based build tool. A help task would like to know what tasks were also specified in order to print their usage and halt the build proc...

Rakefile rule output generation problem.

Hi all, i have a Rakefile with a rule like this : rule '.so' => '.cc' do |t| puts "@ Compiling #{t.source}" output = t.source.ext("so") output['stdlib'] = 'build' sh "mkdir -p #{File.dirname(output)}" sh "#{CXX} #{t.source} -o#{output} #{STDLIB_CFLAGS} #{STDLIB_LFLAGS}" end As you can see, it generates many .so lib...

[Ruby] Confirm existance of executable (script, bat, cmd, exe) via a ruby file.

Using a ruby file (or any rake facility) I need to find out if the user who executes my script is able to execute certain shell commands. In particular g++ etc. Hopefully system independent so if there is some g++.bat, g++.exe or just g++ (etc) it should say yes nevertheless, as long as its on the path and executable on the users system....

spec rake task for daily cron

I have a series of rspec tests which I use to make sure some web scraping services I wrote are still valid. I have all of these inside a GEM which my rails app requires and I'm not quite sure how to embed a rake task of spec for an external gem? I'm not sure that is at all clear, I have a gem w/rspecs: Gem w/rspecs MyApp I would lik...

Adding Growl notifications after Rake tasks are finished

Is there a way to add Growl notifications to the end of all Rake tasks? I initially thought of creating a task that Growls, and adding it as a dependency to tasks I want alerts from, but realized the dependencies get run before the task begins. Is there a way to add tasks to be run after certain Rake tasks are finished? It'd be really...

"No Rakefile found" when I run "rake gems:refresh_specs"

When I run my app I get this error: config.gem: Unpacked gem rakismet-0.3.6 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this. And when I run: rake gems:refresh_specs I get: No Rakefile found I've tried the rake command from various directories within the application hierarchy with no success....

How do you generate a new Rakefile for a Rails app that has "lost" its Rakefile?

Somehow my Rails app doesn't have a Rakefile. I don't know if it lost it or what. So when I run: rake gems:refresh_specs I get: No Rakefile found How do I generate a new Rakefile to refresh my gem specs? ...

Missing RedCloth gem but `rake gems:install` does nothing

I tried starting my Rails application but got this error message from Passenger: Ruby on Rails application could not be started The application has exited during startup (i.e. during the evaluation of config/environment.rb) /home/chuck/chuck.com/vendor/rails/railties/lib/rails/gem_dependency.rb:119: Warning: Gem::Dependency#version_...

Clean up task when combining multiple tasks in Rake

I have a build task in rake defined with the following dependencies: desc 'Builds the App' task :rebuild_dev => ["solr:start", "db:drop", "db:create", "db:migrate", "spec", "solr:stop"] The first task "solr:start" starts the Solr Indexing server. Now, if the build fails (may be in spec tests fail), the "solr:stop" task is not executed...