Re: Programmatically Spinning Workers Up and Down

2010-07-29 Thread Anand Ramanathan
I havent had the need for multiple dynos, but this link seems to be about
scaling dynos, not workers - is that correct?

On Sat, Jul 17, 2010 at 10:58 PM, Ben Schwarz ben.schw...@gmail.com wrote:

 I assume that you haven't seen this recent release from ddollar.

 http://github.com/ddollar/heroku-autoscale

 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



workers dying overnight

2010-07-29 Thread Alex Chaffee
I wrote a simple Heroku app to do service monitoring. It uses
DelayedJob to queue up repeating tasks like doing an HTTP ping of a
server once a minute or once an hour.

Twice now the worker has died overnight. heroku workers still says
I'm running 1 worker, but there's no message in heroku logs -- not
even the stub of logs from the DJ worker that was there before. It
looks like the worker instance has been retired by the scheduler. If
I run heroku workers 0; heroku workers 1 then it comes back and my
jobs all start running.

Aha! It just started up a worker on its own after I hit the web page
for the first time today. I think the scheduler needs to be smarter
about worker proceses... maybe it needs to check the database for any
Delayed Jobs whose run_at is soon, and either not retire it or make
sure a worker comes online in time to run it.

The code is at http://github.com/alexch/sentry if you want to try it yourself.

Has anyone else had this problem?

--

Alex Chaffee - a...@cohuman.com - http://alexch.github.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
http://alexch.tumblr.com

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Animating Bundles

2010-07-29 Thread davidvm
Heroku support already replied and said that the Bundles animate
function is currently broken. So this answers my question. The option
for now is to download the bundle and extract it to get a copy of the
code and a pgdump of the database. You could then load this pgdump
into a local Postgres database and push it into Heroku. This is what I
am trying to do right now.

On Jul 24, 2:52 pm, davidvm davidvargasm...@gmail.com wrote:
 Hello everyone,

 Sorry if this has already been discussed, but I have to ask it again:

 Since it is stated on the Bundles page that:

 Bundles provide an easy way for you to capture and restore your
 entire application and database with a single command  --(http://
 addons.heroku.com/bundles)

 and that single restore command seems to be bundles:animate,

 why does it not just work and restore your entire application and
 database back? It creates a new empty app. Are there any steps to
 follow after this?

 Thanks!!

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: workers dying overnight

2010-07-29 Thread Dan Croak
Only time I've had issues with workers is when I messed up something
on my side so that I was causing DJ to crash. I debugged it by doing:

heroku ps

On Thu, Jul 29, 2010 at 11:10 AM, Alex Chaffee a...@cohuman.com wrote:
 I wrote a simple Heroku app to do service monitoring. It uses
 DelayedJob to queue up repeating tasks like doing an HTTP ping of a
 server once a minute or once an hour.

 Twice now the worker has died overnight. heroku workers still says
 I'm running 1 worker, but there's no message in heroku logs -- not
 even the stub of logs from the DJ worker that was there before. It
 looks like the worker instance has been retired by the scheduler. If
 I run heroku workers 0; heroku workers 1 then it comes back and my
 jobs all start running.

 Aha! It just started up a worker on its own after I hit the web page
 for the first time today. I think the scheduler needs to be smarter
 about worker proceses... maybe it needs to check the database for any
 Delayed Jobs whose run_at is soon, and either not retire it or make
 sure a worker comes online in time to run it.

 The code is at http://github.com/alexch/sentry if you want to try it yourself.

 Has anyone else had this problem?

 --

 Alex Chaffee - a...@cohuman.com - http://alexch.github.com
 Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
 http://alexch.tumblr.com

 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Update Bundler to 1.0.0.rc.1 for use with Rails 3.0.0.rc?

2010-07-29 Thread Nate W
I know it's only been a day, but Rails 3.0 RC1 is really a huge
improvement over beta4 and for now I can't upgrade because I get the
error on pushing:

- Gemfile detected, running Bundler
   No compatible versions could be found for required
dependencies:
   Conflict on: bundler:
   * bundler (0.9.26) activated by bundler (= 0.9.26, runtime)
   * bundler (= 1.0.0.rc.1, runtime) required by rails (=
3.0.0.rc, runtime)
   All possible versions of origin requirements conflict.


Any word on getting 1.0.0.rc.1?  Thanks guys.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Git push with multiple apps

2010-07-29 Thread barbq
Hi,

I've just created my second app, and I was wondering how do I control
git to push files into which app?

Thanks..

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Custom Error Pages

2010-07-29 Thread daniel hoey

Is there anyway to use our own error pages instead of the Heroku
ones?

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



YAML::load(string) failing on Heroku with 'an instance of IO needed'

2010-07-29 Thread Justin
Hi folks!  Can someone help me find the problem with my migration,
below?  It's working fine on my local environment, but when I run it
in Heroku I get 'an instance of IO needed' error.  I shouldn't need an
IO instance since I'm passing a string to the method--or at least
that's the intent.  The intent of the code is to read from the
database a serialized instance of a Grid, deserialize the object,
create a StaggeredGrid based on the contents, then serialize the new
object.  I can't do this directly at the ActiveRecord level because
the active record object that owns the grid is expecting a
StaggeredGrid and fails validation.

Any ideas?  Thanks in advance!

=== migration file:

# This seems to be required for YAML::load since the Grid class is
never
# directly invoked
require 'lib/grid'
require 'lib/staggered_grid'

class GridToStaggeredGrid  ActiveRecord::Migration
  def self.up
say_with_time Changing existing grids to staggered grids... do
  suppress_messages do
grids = execute SELECT id, grid FROM grids
grids.each do |grid|
  old_grid = YAML::load(grid[1])
  new_grid = StaggeredGrid.new old_grid.row_count,
old_grid.column_count
  old_grid.each_with_coordinates do | cell, row, column |
new_grid[row][column] = cell
  end
  result = execute UPDATE challenges SET grid =
'#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
end
  end
end
  end

  def self.down
say_with_time Changing existing staggered grids back to grids...
do
  suppress_messages do
grids = execute SELECT id, grid FROM grids
grids.each do |grid|
  old_grid = YAML::load grid[1]
  new_grid = Grid.new old_grid.row_count,
old_grid.column_count
  old_grid.each_with_coordinates do | cell, row, column |
new_grid[row][column] = cell
  end
  result = execute UPDATE challenges SET grid =
'#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
end
  end
end
  end
end

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: workers dying overnight

2010-07-29 Thread Pito Salas
That's a scary subject line!!

;)

-- Pito

On Thu, Jul 29, 2010 at 11:10 AM, Alex Chaffee a...@cohuman.com wrote:
 I wrote a simple Heroku app to do service monitoring. It uses
 DelayedJob to queue up repeating tasks like doing an HTTP ping of a
 server once a minute or once an hour.

 Twice now the worker has died overnight. heroku workers still says
 I'm running 1 worker, but there's no message in heroku logs -- not
 even the stub of logs from the DJ worker that was there before. It
 looks like the worker instance has been retired by the scheduler. If
 I run heroku workers 0; heroku workers 1 then it comes back and my
 jobs all start running.

 Aha! It just started up a worker on its own after I hit the web page
 for the first time today. I think the scheduler needs to be smarter
 about worker proceses... maybe it needs to check the database for any
 Delayed Jobs whose run_at is soon, and either not retire it or make
 sure a worker comes online in time to run it.

 The code is at http://github.com/alexch/sentry if you want to try it yourself.

 Has anyone else had this problem?

 --

 Alex Chaffee - a...@cohuman.com - http://alexch.github.com
 Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
 http://alexch.tumblr.com

 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: new Bundler version?

2010-07-29 Thread nader
I'm in the same boat.  Thanks.

On Jul 26, 5:57 am, Dan Croak dcr...@thoughtbot.com wrote:
 Howdy,

 I was messing with a Rails 3 app on REE  Heroku. Things started out
 well but as I added dependencies to my Gemfile, I started getting seg
 faults:

 https://rails.lighthouseapp.com/projects/8994/tickets/5193-segmentati...

 The fix in development was to use bundler --pre.

 But now, when I try to deploy to Heroku, I get:

     Your Gemfile.lock was generated by Bundler 0.10.
     You must delete it if you wish to use Bundler 0.9.
     FAILED: Have you updated to use a 0.9 Gemfile?
    http://docs.heroku.com/gems#gem-bundler

 It looks like Yehuda is releasing a Bundler 1.0.0 release candidate
 tomorrow:

 http://twitter.com/wycats/status/19558387994

 Will Heroku be upgrading to that version of Bundler? I'm not sure how
 to test our Rails 3 on Heroku otherwise.

 Thanks!
 Dan

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Quickstart: const_missing error on Create

2010-07-29 Thread Lance
I'm trying Heroku for the first time and on step 3 of the Quickstart
I'm already stuck:
http://docs.heroku.com/quickstart

When I try to use heroku create, I get the following error, which
seems to be related to the HTTP_PROXY environment variable.  In my
case, its not set, because I'm not behind a proxy, but it errors-out
if I dont set a value for it.

By the way, I'm using IronRuby 1.1, which its possible is part of the
problem...

help?

C:/IronRuby/lib/ruby/1.8/net/http.rb:567:in `const_missing':
uninitialized cons
ant OpenSSL::SSL::SSLSocket (NameError)
from C:/IronRuby/lib/ruby/1.8/net/http.rb:567:in `connect'
from C:/IronRuby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from C:/IronRuby/lib/ruby/1.8/net/http.rb:542:in `start'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/rest-client-1.4.2/
lib/restc
ient/request.rb:150:in `transmit'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/rest-client-1.4.2/
lib/restc
ient/request.rb:55:in `execute'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/rest-client-1.4.2/
lib/restc
ient/request.rb:30:in `execute'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/rest-client-1.4.2/
lib/restc
ient/resource.rb:59:in `post'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/cl
ent.rb:463:in `__send__'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/cl
ent.rb:463:in `process'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/cl
ent.rb:449:in `post'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/cl
ent.rb:150:in `add_key'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/keys.rb:22:in `add'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `__send__'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `run_internal'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/auth.rb:105:in `save_credentials'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/auth.rb:47:in `get_credentials'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/auth.rb:30:in `user'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/auth.rb:10:in `init_heroku'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/auth.rb:6:in `client'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `__send__'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `run_internal'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/base.rb:36:in `heroku'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mands/app.rb:27:in `create'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `__send__'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:48:in `run_internal'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/lib/
heroku/co
mand.rb:20:in `run'
from C:/IronRuby/lib/ironruby/gems/1.8/gems/heroku-1.9.12/bin/
heroku:13
from C:/IronRuby/bin/heroku:19:in `load'
from C:/IronRuby/bin/heroku:19

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails

2010-07-29 Thread jgervin
Getting the Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8
rails`, update your RAILS_GEM_VERSION setting in config/environment.rb
for the Rails version you do have installed, or comment out
RAILS_GEM_VERSION to use the latest version installed. error.

Not sure what to do?

Yes, I have looked at http://docs.heroku.com/rails236 but I am not
using Bamboo and non of the other information seems to help. I can't
seem to pinpoint what gem is causing me the issue.
---
I tried rake gems and get this:

computer:wanttos jdog$ rake gems
(in /Users/jdog/work/wanttos)
DEPRECATION WARNING: Rake tasks in vendor/plugins/paperclip/tasks are
deprecated. Use lib/tasks instead. (called from top (required) at /
usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.8/lib/tasks/rails.rb:10)
 - [F] rmagick

I = Installed
F = Frozen
R = Framework (loaded before rails starts)


---
Here is the contents of my .gem file:

rails -v 2.3.8
actionmailer --version 2.3.8
actionpack --version 2.3.8
activerecord --version 2.3.8
activeresource --version 2.3.8
activesupport --version 2.3.8
auth-hmac --version 1.1.1
configuration --version 1.1.0
crack --version 0.1.8
gemcutter --version 0.6.1
hashie --version 0.2.1
heroku --version 1.9.12
hoe --version 2.6.1
hpricot --version 0.8.2
httparty --version 0.6.1
json_pure --version 1.4.3
launchy --version 0.3.7
mash --version 0.1.1
mime-types --version 1.16
oauth --version 0.4.1
rack --version 1.2.1
rake --version 0.8.7
rest-client --version 1.6.0
rmagick --version 2.13.1
ruby-hmac --version 0.4.0
rubyforge --version 2.0.4
rubygems-update --version 1.3.7
sqlite3-ruby --version 1.3.1
twitter --version 0.9.8
yajl-ruby --version 0.7.7


TIA, J


-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: new Bundler version?

2010-07-29 Thread Eric Hurst
 Will Heroku be upgrading to that version of Bundler? I'm not sure how
 to test our Rails 3 on Heroku otherwise.

+1 for Bundler RC support.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: YAML::load(string) failing on Heroku with 'an instance of IO needed'

2010-07-29 Thread Matthew A. Brown
You could try using a StringIO as a workaround

On Wed, Jul 28, 2010 at 16:35, Justin jsh...@gmail.com wrote:
 Hi folks!  Can someone help me find the problem with my migration,
 below?  It's working fine on my local environment, but when I run it
 in Heroku I get 'an instance of IO needed' error.  I shouldn't need an
 IO instance since I'm passing a string to the method--or at least
 that's the intent.  The intent of the code is to read from the
 database a serialized instance of a Grid, deserialize the object,
 create a StaggeredGrid based on the contents, then serialize the new
 object.  I can't do this directly at the ActiveRecord level because
 the active record object that owns the grid is expecting a
 StaggeredGrid and fails validation.

 Any ideas?  Thanks in advance!

 === migration file:

 # This seems to be required for YAML::load since the Grid class is
 never
 # directly invoked
 require 'lib/grid'
 require 'lib/staggered_grid'

 class GridToStaggeredGrid  ActiveRecord::Migration
  def self.up
    say_with_time Changing existing grids to staggered grids... do
      suppress_messages do
        grids = execute SELECT id, grid FROM grids
        grids.each do |grid|
          old_grid = YAML::load(grid[1])
          new_grid = StaggeredGrid.new old_grid.row_count,
 old_grid.column_count
          old_grid.each_with_coordinates do | cell, row, column |
            new_grid[row][column] = cell
          end
          result = execute UPDATE challenges SET grid =
 '#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
        end
      end
    end
  end

  def self.down
    say_with_time Changing existing staggered grids back to grids...
 do
      suppress_messages do
        grids = execute SELECT id, grid FROM grids
        grids.each do |grid|
          old_grid = YAML::load grid[1]
          new_grid = Grid.new old_grid.row_count,
 old_grid.column_count
          old_grid.each_with_coordinates do | cell, row, column |
            new_grid[row][column] = cell
          end
          result = execute UPDATE challenges SET grid =
 '#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
        end
      end
    end
  end
 end

 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: YAML::load(string) failing on Heroku with 'an instance of IO needed'

2010-07-29 Thread Justin
I discovered the issue.  The problem was a difference in SQLite/
PostgreSQL connector behavior.  The SQLite connector seems to allow
field access by index, but the PostreSQL connector returned nil values
when I tried to access the field by index.  When I changed grid[0]
to grid['id'], etc, the issue went away.  The red herring was the
error message produced when YAML complained about getting a nil object
passed into YAML::load.

Thanks folks!
--Justin

On Jul 28, 4:35 pm, Justin jsh...@gmail.com wrote:
 Hi folks!  Can someone help me find the problem with my migration,
 below?  It's working fine on my local environment, but when I run it
 in Heroku I get 'an instance of IO needed' error.  I shouldn't need an
 IO instance since I'm passing a string to the method--or at least
 that's the intent.  The intent of the code is to read from the
 database a serialized instance of a Grid, deserialize the object,
 create a StaggeredGrid based on the contents, then serialize the new
 object.  I can't do this directly at the ActiveRecord level because
 the active record object that owns the grid is expecting a
 StaggeredGrid and fails validation.

 Any ideas?  Thanks in advance!

 === migration file:

 # This seems to be required for YAML::load since the Grid class is
 never
 # directly invoked
 require 'lib/grid'
 require 'lib/staggered_grid'

 class GridToStaggeredGrid  ActiveRecord::Migration
   def self.up
     say_with_time Changing existing grids to staggered grids... do
       suppress_messages do
         grids = execute SELECT id, grid FROM grids
         grids.each do |grid|
           old_grid = YAML::load(grid[1])
           new_grid = StaggeredGrid.new old_grid.row_count,
 old_grid.column_count
           old_grid.each_with_coordinates do | cell, row, column |
             new_grid[row][column] = cell
           end
           result = execute UPDATE challenges SET grid =
 '#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
         end
       end
     end
   end

   def self.down
     say_with_time Changing existing staggered grids back to grids...
 do
       suppress_messages do
         grids = execute SELECT id, grid FROM grids
         grids.each do |grid|
           old_grid = YAML::load grid[1]
           new_grid = Grid.new old_grid.row_count,
 old_grid.column_count
           old_grid.each_with_coordinates do | cell, row, column |
             new_grid[row][column] = cell
           end
           result = execute UPDATE challenges SET grid =
 '#{YAML::dump(new_grid)}' WHERE id = #{grid[0]}
         end
       end
     end
   end
 end

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Git push with multiple apps

2010-07-29 Thread Henry Wagner
Hi,

What I do is have a separate directory for each app

/heroku/app1
/heroku/app2

For each app, do

cd /heroku/app1
git init
git add .
git commit -m initial commit
heroku create your app name
git push heroku master

cd /heroku/app2
repeat

This will create separate heroku apps, and separate git repositories. When
you run 'git push heroku master' it will know which app to push to.

Henry

On Wed, Jul 28, 2010 at 6:20 AM, barbq barbq2...@gmail.com wrote:

 Hi,

 I've just created my second app, and I was wondering how do I control
 git to push files into which app?

 Thanks..

 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Git push with multiple apps

2010-07-29 Thread Neil Middleton
http://docs.heroku.com/git#how-heroku-uses-git-remotes

On Wed, Jul 28, 2010 at 2:20 PM, barbq barbq2...@gmail.com wrote:

 Hi,

 I've just created my second app, and I was wondering how do I control
 git to push files into which app?

 Thanks..

 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.




-- 
Neil Middleton

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.