Run rake task in controller
Hi all, I'd like to run a rake task in my controller. Is there any way to do this? Thanks, Sophy, ...
Hi all, I'd like to run a rake task in my controller. Is there any way to do this? Thanks, Sophy, ...
Hi, when CruiseControl.rb wants to perform an integration test it looks for a rake task called "cruise" within the project and executes it. Is there a way to hand over the current revision number to that task? I'm deploying an app using capistrano on a remote machine after integration tests. Because capistrano will deploy the HEAD rev...
How would I go about accessing the Bundle-Fu plugin from this rake task? I have tried everything out and nothing seems to work. Note: assets_javascript & assets_css are both arrays of files that are pulled from a central location to keep this rake task and the view DRY. desc "Generate cached css/js files" task :asset_cache_genera...
I have a database set up for my Rails installation and some migrations set up. I would like to be able to reset my database back down to having no tables/constraints/etc., but can't find a reasonable way to do this without knowing the number of migrations or the timestamp of the first migration. Here are my options as I see them: rake ...
Hi, My RAILS_ROOT is /usr/local/www/application/ If I run 'rake db:migrate RAILS_ENV=production" from within the RAILS_ROOT it works fine. However I can't seem to find a way to run the same command from outside the RAILS_ROOT. Help is appreciated. Many Thanks ...
I have a default scope set in my model. However, when I call a particular model function from my rake task, I don't want the scope to be in effect. So, when my model is loaded, how can I tell if it was loaded within a rake task or not. ...
Hello, After installing RedCloth, I can not run any "rake" -tasks. I get: rake aborted! uninitialized constant Gem::Specification::PLATFORM_CROSS_TARGETS Here's output of rake routes --trace Versions: Rake - 0.8.4 Rails - 2.3.2 Ruby - 1.8.7 RedCloth - 4.2.2 Gem - 1.3.5 the Rakefile: `require(File.join(File.dirname(FILE), 'co...
I have 4 related migrations in my Rails app: First 3 migrations create one table each in the self.up and and drops them in their respective self.down methods. 4th migration runs a rake task that loads data to all three (in self.up). I am thinking what to put in self.down of this migration to delete the rows from the 3 tables? Am I doi...
when i run this: sh "#{MBUNIT_PATH}Gallio.Echo.exe /no-echo-results src/#{dll}/bin/Debug/#{dll}.dll" in my rakefile, gallio runs my mbunit tests, and TC picks up the results :D but this: sh "#{NUNIT_PATH}nunit-console.exe /nologo src/#{dll}/bin/Debug/#{dll}.dll" does run my tests, but TC doesnt pick up the result :( I first tried...
Hi, I'm on Rails 2.3.3 and using Haml 2.0.9 for my templates and Gettext-Rails 2.0.4 for the translation. Haml works like a charm and gettext is also working like it should. But I cant get Gettext to parse Haml Files when using "rake updatepo". I created a custom parser like this: # lib/haml_parser.rb require 'gettext_rails/tools' req...
Hi, I am unable to run rake test:functionals with SQLite3, it gives me this error : rake aborted! Permission denied - db/test.sqlite (See full trace by running task with --trace) My setup is on Windows XP. Tests were working a few weeks ago. Rails 2.3.2, Rake 0.8.7, sqlite3-ruby 1.2.5 gems I am using Netbeans for development, but e...
I'm running rails on Mac OS X. I think I installed it correctly, but I'm getting the following error. $ rake db:create (in /Users/user_name/myapp) rake aborted! Could not find RubyGem mocha (>= 0) (See full trace by running task with --trace) What is the problem? How do I fix it? ...
I having a problem: $ rake db:create (in /Users/devinross14/myapp) rake aborted! RubyGem version error: rake-compiler(0.6.0 not ~> 0.5.0) (See full trace by running task with --trace) How do I fix this? ...
I am developing a ROR app that relies on many custom Rake tasks. What is the best way to test them? ...
I'm converting some of my NAnt build scripts over to rake. Does anyone know how to access the system properties (e.g. build.number) inside my rake scripts? Is the Teamcity rake plugin even injecting them? I can't seem to find the doco. ...
I'm trying to do a rake migrate, but I'm getting an error when I do this: rake db:migrate What I get back: rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile' (See full trace by running task with --trace) How do I ...
Hello, my problem is that in my app I want to generate the gettext .pot file with rake but I'm getting a file with no keys, only the header text ("Some descriptive title. Copyright (C)..."). I'm using the task gettext:find getttext_18n_rails. I tried before with the classic updatepo task but was the same. Perhaps am I missing any gem? ...
I want to execute a rake script from within a model. Beside calling it via backtick, is there anyway to include the rake library and call Rake::Task['some_task'].invoke. ...
I've seen some plugins and custom rake tasks to dump the active db to fixtures, but I'm not sure what the prevailing technique is. Basically, I want the opposite of rake:db:fixtures:load so that I can put basic db information (the admin user account, for one) into svn for when we deploy. I don't want to have to create fixtures manually ...
Hi, I have a rails app that I'm moving to another server and I figure I should use db:schema:load to create the mysql database because it's recommended. My problem is that I'm using capistrano to deploy and it seems to be defaulting to rake db:migrate instead. Is there a way to change this or is capistrano using db:migrate for a good re...