similar to: Dose custom rake task ignore observer?

Displaying 20 results from an estimated 40000 matches similar to: "Dose custom rake task ignore observer?"

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,
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
2011 May 25
1
rake task: uninitialized constant
I have this rake taks: CUSTOM_MONTHS = [nil, "GEN", "FEB", "MAR", "APR", "MAG", "GIU", "LUG", "AGO", "SET", "OTT", "NOV", "DIC"] def parse_date_string(date_string) begin day, month, year = date_string.split("-") Time.mktime(year, CUSTOM_MONTHS.index(month),
2013 Nov 17
0
Retrieve host info in Rake task ?
Hi, I''m writing a rake task for a standard Rails 3.x project. I''d like to retrieve a info from rails about project''s hostname and if possible also about protocol (http, https) and default port. I can access these values from a controller f.E. but what about rake task ? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed
2013 Feb 22
0
Rake task that allows you generate static error pages in public folder from partial.
https://gist.github.com/907th/5013075 Rake task that allows you generate static error pages in public folder from layouts/exception partial. Usage: rake exceptions:compile_error_pages RAILS_ENV=production. Dependencies: colored gem for pretty output (https://rubygems.org/gems/colored), rails 3.2 (tested only for that version). -- You received this message because you are subscribed to the
2010 Nov 08
0
Rails3: "rake test" task does not run tests.
Hello all, I have a spiffy new rails3 app for which I can run tests individually, but not via rake. Behold! > $ ruby -Itest test/unit/test_user.rb > Loaded suite test/unit/test_user > Started > . > Finished in 0.466033 seconds. > > 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips > > Test run options: --seed 21789 and > $ rake test:units --trace > (in
2012 May 18
2
Ideas For Handling Rake Task Errors
I am looking for some ideas on how I can create some way of error alerts for failed rake tasks and how some of you are handling something like this. Basically if a rake tasks fails I would like to have some kind of alert by email that the task did not complete. Are there any services that your using to do something like this? Currently I am running these tasks via cron. Thank You -- You
2012 Feb 11
1
rake command shows the error
rails -v=2.3.8 gem -v= 1.4.2 ruby -v=1.8.7 When i issue the "rake" command ,it gives the following error . (in /home/amrit/amrit/OSV/OpenStreetView) /usr/bin/ruby1.8 -I"lib:test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/main_controller_test.rb" "test/functional/upload_controller_test.rb"
2012 Dec 04
0
Empty test suite is run after every rake task
When I run rake db:migrate or rake -T I get these lines at the end: Finished in 0.000276 seconds. 0 tests, 0 assertions, 0 failures, 0 errors My Gemfile is: source ''http://rubygems.org'' gem ''rack'' gem ''rails'', ''3.0.9'' gem "acl9", ''0.12.0'' gem "fastercsv"#, :version =>
2010 Feb 25
0
Rails problems running rake and other tasks - undefined method `action_controller'
I suddenly have a major problem in all my Rails 3 apps: $ rake db:migrate --trace rake aborted! Don''t know how to build task ''db:migrate'' /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/ rake.rb:1728:in `[]'' /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/ rake.rb:2050:in `invoke_task''
2010 Dec 09
0
invoke rake tasks
Hello I have script in Rails root folder like this tasks = [some tasks...] tasks.each do |task| fork do Rake::Task[task].execute end end And get the error "Don''t know how to build task". How to execute my tasks? In terminal rake task_name works correctly -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the
2007 Oct 20
1
Rake task and custom code.
Hi I have some classes I''ve created to perform some work on my site. I''d like them to be usable in my Controllers, and MORE specifically in my Rake Tasks. Where should they be used so when I require / load them they are found? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2012 Apr 18
0
rake .rake subfolder not working
I read that if you create a .rake subfolder, you can run rake from any subfolder in and it will pickup the rake tasks as long as you put the -g option. I have this: /app/ /app/Rakefile /app/.rake/test.rake Now when I do: rake -g -T I only see the tasks defined in my Rakefile. Does this work like this or am i confused? Because I just tested, if I go to a subfolder, rake works fine. Not sure
2010 Jun 30
0
rake TestTask problem with t.options
I am trying to understand some rake stuff better .. I have a test that works fine if I do: "ruby test/integration/tcp_test.rb -n test_job_create" but if I try to do it in a rake file like below, it errors out. It seems the t.options is the problem because I can get it to work without that: /usr/bin/ruby -I"lib" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/
2010 Oct 22
1
Could not find rake-0.8.7 in any of the sources
After upgrading my server to: Ubuntu server 10.10 Ruby 1.9.2 Rails 3.0.1 Passenger 3.0.0 rake is unable to find itself: > rake -T Could not find rake-0.8.7 in any of the sources Try running `bundle install`. but `gem list` and ''bundle list'' shows that rake-0.8.7 is installed! When loading the webapp in the browser: Could not find rake-0.8.7 in any of the sources
2011 Nov 01
1
rake db:migrate aborted
I''m reading the rails tutorial book and in chapter 6 page 199 I have to make a rake db:migrate, but I get this error: rake aborted! undefined method `prerequisites'' for nil:NilClass (See full trace by running task with --trace) When I try with rake db:migrate --trace I get the following errors: rake aborted! undefined method `prerequisites'' for nil:NilClass
2010 Sep 23
0
rake aborted! undefined method `autoload!'
Hi! I made a app in rails 3.0.0, but when i try to upload to my hosting i take to change the version of rails to rails 3.0.0.beta4 Im make the bundle install and every step cool, but when i try to do the rake db:migrate i have the next error... -bash-3.2$ rake db:migrate --trace (in /home/aerotour/public_html/aeto) rake aborted! undefined method `autoload!'' for
2010 Feb 04
0
How to start/stop database from rake?
Hello, I would like to start the database server (postgres) before tests are run and stop it afterwards. For this, I have created a little wrapper around rake: $ cat run-rake #! /bin/sh DB=`pwd`/db/pgdata # init database cluster if it does not exist yet [ -d $DB ] || initdb -D$DB # start the database server pg_ctl -D$DB -o "-h '''' -k
2010 Nov 15
0
rake path seems wrong
I''m trying to test rake to make sure it works but I''m getting the following error /usr/local/bin/rake:19:in `load'': no such file to load -- /Users/mauro/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake (LoadError) from /usr/local/bin/rake:19 rake is installed in /usr/local/bin/rake not sure why the path is screwed up. How do I fix this??? -- Posted via
2012 Jan 05
2
Error while rake actions
rake aborted! /home/Mahesh/uma/myapp/Rakefile:6: unterminated string meets end of file /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'' /usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'' /usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'' /usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling''