Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I solved this, finally, after a lot of mucking about. The short version of what I did, missing out the many experiments, was this:</p> <p>1) change the Gemfile to specify Rake 0.8.7 </p> <pre><code>#in Gemfile gem "rake", "0.8.7" </code></pre> <p>2) Take out a hack that I had previously added to Rakefile based on Stack&nbsp;Overflow question <em><a href="https://stackoverflow.com/questions/6085610/rails-rake-problems-uninitialized-constant-rakedsl">Ruby on Rails and Rake problems: uninitialized constant Rake::DSL</a></em>: </p> <p>So, my Rakefile is now back to being the standard Rakefile for my app:</p> <pre><code># Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) require 'rake' MyApp::Application.load_tasks </code></pre> <p>3) Change Heroku to run my app in Ruby 1.9.2:</p> <pre><code>heroku stack:migrate bamboo-mri-1.9.2 --app myapp git push heroku master </code></pre> <p>And it seems fine now - the scheduled cron task is running anyway.</p> <p>EDIT: It <em>did</em> run fine, once, then blew up again next time I pushed something! Arrgh. I think I fixed it now, with the addition of the <code>delayed_job</code> gem, based on the conversation <em><a href="http://groups.google.com/group/heroku/browse_thread/thread/49bd5333071cd0d1" rel="nofollow noreferrer">Don't know how to build task jobs:work</a></em>.</p> <p>Installing <code>delayed_job</code> doesn't seem like a great solution, but it HAS worked, and I might want to use it sometime I guess, especially with Heroku's once-per-hour cron job (which just isn't frequent enough - there are things I'll probably want to run every five minutes). After I installed the <code>delayed_job</code> gem I had to do the setup for it, otherwise Heroku complains about the missing <code>delayed_jobs</code> table:</p> <pre><code>#add to gemfile gem 'delayed_job' #at command line bundle install rails g delayed_job rake db:migrate git add -A git commit -a -m "added delayed_job gem" git push heroku rake db:migrate --app myapp heroku restart --app myapp </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload