Re: Anyone having trouble using heroku console?

2011-09-24 Thread Alex Killough
I know this thread is two months old, but it is the only reference in
the official Heroku channels I have found referring to the dsl
conflict with the 1.9.2 stack and rake 0.9.x (I resorted to SO to find
a few more thorough explanations and possible solutions). If
documentation exists it would be great to know where for reference.

The conflict came about while fixing an issue with a crashed email
notification job. Turns out moving my stack from bamboo-ree(1.8.7) to
bamboo-mri(1.9.2) caused cron to throw 'uninitialized constant
Rake::DSL'.

Unfortunately this wasn't caught until we noticed nightly jobs had
stopped running.

Unfortunate as one of the jobs is a forum notification mass-mailer
that had a queue backed up for several days. ~2850 errant emails after
fixing the rake issue (5 minutes), our solution was to alter our Rake
file in the exact order below, adding "require 'rake/dsl_definition'"
_before_ "require 'rake'":

  require File.expand_path('../config/application', __FILE__)

  require 'rake/dsl_definition'
  require 'rake'

Beyond changes to the stack, I'd second updating  documentation for
cron, dj, workers, and proc/rake to include this potential conflict,
and methods to prevent the issue.

-Alex

On Thu, Jul 21, 2011 at 9:59 AM, Terence Lee  wrote:
> That's a good point. We'll take a look at adding something here.
>
> -Terence
>
> On Thu, Jul 14, 2011 at 4:48 PM, Francois  wrote:
>>
>> Terence
>>  this error has been happening to a lot of people, it might be worth
>> mentioning this in the docs somewhere? I searched for 'uninitialized
>> constant Rake::DSL' in the docs and there was no mention.
>>
>> - F
>>
>> On Jul 14, 10:53 am, Terence Lee  wrote:
>> > Hello Keenan,
>> >
>> > It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
>> > that's the one being called here. We're looking into ways to fix this.
>> > In
>> > the meantime, can you try hard coding your rake to 0.8.7 in your
>> > Gemfile?
>> > Once you have that working locally, it should work fine on heroku.
>> >
>> > Best,
>> > Terence
>> >
>> >
>> >
>> > On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock 
>> > wrote:
>> > >  Hi,
>> >
>> > > Question: Are others able to run: heroku rake db:migrate OR heroku
>> > > console
>> > > "puts Model.count" ?
>> >
>> > > This is probably user error, but I can't figure it out. reminds me of
>> > > not
>> > > specifying RAILS_ENV when running rails console.
>> >
>> > > I had run rake db:seed which populated the Avatar model.
>> > > I view a page on the website that relies upon the Avatar model.
>> > > I ran heroku config:add RAILS_ENV=production (just in case)
>> >
>> > > But from heroku console:
>> >
>> > > *> puts Avatar.count*
>> > > ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars"
>> > > does
>> > > not exist
>> > > :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
>> > > d.adsrc, a.attnotnull
>> > >               FROM pg_attribute a LEFT JOIN pg_attrdef d
>> > >                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
>> > >              WHERE a.attrelid = '"avatars"'::regclass
>> > >                AND a.attnum > 0 AND NOT a.attisdropped
>> > >              ORDER BY a.attnum
>> >
>> > >
>> > > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
>> > > ection_adapters/abstract_adapter.rb:207:in
>> > > `rescue in log'
>> > >
>> > > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
>> > > ection_adapters/abstract_adapter.rb:199:in
>> > > `log'
>> > >
>> > > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
>> > > ection_adapters/postgresql_adapter.rb:501:in
>> > > `query'
>> > >
>> > > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
>> > > ection_adapters/postgresql_adapter.rb:1037:in
>> > > `column_definitions'
>> >
>> > > *> heroku rake db:migrate*
>> >
>> > > (in /app)
>> > > rake aborted!
>> > > uninitialized constant Rake::DSL
>> > > /usr/r

Re: Anyone having trouble using heroku console?

2011-07-21 Thread Terence Lee
That's a good point. We'll take a look at adding something here.

-Terence

On Thu, Jul 14, 2011 at 4:48 PM, Francois  wrote:

> Terence
>  this error has been happening to a lot of people, it might be worth
> mentioning this in the docs somewhere? I searched for 'uninitialized
> constant Rake::DSL' in the docs and there was no mention.
>
> - F
>
> On Jul 14, 10:53 am, Terence Lee  wrote:
> > Hello Keenan,
> >
> > It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
> > that's the one being called here. We're looking into ways to fix this. In
> > the meantime, can you try hard coding your rake to 0.8.7 in your Gemfile?
> > Once you have that working locally, it should work fine on heroku.
> >
> > Best,
> > Terence
> >
> >
> >
> > On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock 
> wrote:
> > >  Hi,
> >
> > > Question: Are others able to run: heroku rake db:migrate OR heroku
> console
> > > "puts Model.count" ?
> >
> > > This is probably user error, but I can't figure it out. reminds me of
> not
> > > specifying RAILS_ENV when running rails console.
> >
> > > I had run rake db:seed which populated the Avatar model.
> > > I view a page on the website that relies upon the Avatar model.
> > > I ran heroku config:add RAILS_ENV=production (just in case)
> >
> > > But from heroku console:
> >
> > > *> puts Avatar.count*
> > > ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars"
> does
> > > not exist
> > > : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
> > > d.adsrc, a.attnotnull
> > >   FROM pg_attribute a LEFT JOIN pg_attrdef d
> > > ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> > >  WHERE a.attrelid = '"avatars"'::regclass
> > >AND a.attnum > 0 AND NOT a.attisdropped
> > >  ORDER BY a.attnum
> >
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
> ection_adapters/abstract_adapter.rb:207:in
> > > `rescue in log'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
> ection_adapters/abstract_adapter.rb:199:in
> > > `log'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
> ection_adapters/postgresql_adapter.rb:501:in
> > > `query'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn
> ection_adapters/postgresql_adapter.rb:1037:in
> > > `column_definitions'
> >
> > > *> heroku rake db:migrate*
> >
> > > (in /app)
> > > rake aborted!
> > > uninitialized constant Rake::DSL
> > > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
> > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
> > > `'
> > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
> > > `'
> > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in
> ` > > (required)>'
> > > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in
> `require'
> > > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in ` > > (required)>'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat
> ion.rake:2:in
> > > `require'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat
> ion.rake:2:in
> > > `'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > > `load'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > > `block in '
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > > `each'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > > `'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2
> 15:in
> > > `require'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2
> 15:in
> > > `initialize_tasks'
> > >
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:1
> 39:in
> > > `load_tasks'
> > >
> /app/.bundle/gem

Re: Anyone having trouble using heroku console?

2011-07-15 Thread Alex Chaffee
Rake 0.9.x no longer includes the DSL module in the top level
namespace. So another solution to the "uninitialized constant
Rake::DSL" problem is to explicitly include the DSL module in your
Rakefile, near the top, like this:

require "rake"
include Rake::DSL

It's more or less fixed now (with Rake 0.9.2 and Rails 3.0.9) but it's
been a total clusterfrack and a great example of a poor release
process.

On Jul 14, 10:53 am, Terence Lee  wrote:
> Hello Keenan,
>
> It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
> that's the one being called here. We're looking into ways to fix this. In
> the meantime, can you try hard coding your rake to 0.8.7 in your Gemfile?
> Once you have that working locally, it should work fine on heroku.
>
> Best,
> Terence
>
>
>
>
>
>
>
> On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock  wrote:
> >  Hi,
>
> > Question: Are others able to run: heroku rake db:migrate OR heroku console
> > "puts Model.count" ?
>
> > This is probably user error, but I can't figure it out. reminds me of not
> > specifying RAILS_ENV when running rails console.
>
> > I had run rake db:seed which populated the Avatar model.
> > I view a page on the website that relies upon the Avatar model.
> > I ran heroku config:add RAILS_ENV=production (just in case)
>
> > But from heroku console:
>
> > *> puts Avatar.count*
> > ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars" does
> > not exist
> > :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
> > d.adsrc, a.attnotnull
> >               FROM pg_attribute a LEFT JOIN pg_attrdef d
> >                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> >              WHERE a.attrelid = '"avatars"'::regclass
> >                AND a.attnum > 0 AND NOT a.attisdropped
> >              ORDER BY a.attnum
>
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/abstract_adapter.rb:207:in
> > `rescue in log'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/abstract_adapter.rb:199:in
> > `log'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/postgresql_adapter.rb:501:in
> > `query'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/postgresql_adapter.rb:1037:in
> > `column_definitions'
>
> > *> heroku rake db:migrate*
>
> > (in /app)
> > rake aborted!
> > uninitialized constant Rake::DSL
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in ` > (required)>'
> > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in ` > (required)>'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
> > ion.rake:2:in
> > `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
> > ion.rake:2:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > `load'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > `block in '
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > `each'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
> > 15:in
> > `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
> > 15:in
> > `initialize_tasks'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:1 
> > 39:in
> > `load_tasks'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:7 
> > 7:in
> > `method_missing'
> > /app/Rakefile:7:in `'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
> >

Re: Anyone having trouble using heroku console?

2011-07-14 Thread Keenan Brock
Thank you for all your help.

I added rake and re-created on the cedar stack.

Specifying thin broke my local passenger, so I added a production group

gem 'rake', '0.8.7'
gem 'thin', :group => :production

Thank again,
Keenan

On Jul 14, 2011, at 5:48 PM, Francois  wrote:

> Terence
> this error has been happening to a lot of people, it might be worth
> mentioning this in the docs somewhere? I searched for 'uninitialized
> constant Rake::DSL' in the docs and there was no mention.
>
> - F
>
> On Jul 14, 10:53 am, Terence Lee  wrote:
>> Hello Keenan,
>>
>> It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
>> that's the one being called here. We're looking into ways to fix this. In
>> the meantime, can you try hard coding your rake to 0.8.7 in your Gemfile?
>> Once you have that working locally, it should work fine on heroku.
>>
>> Best,
>> Terence
>>
>>
>>
>> On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock  wrote:
>>>  Hi,
>>
>>> Question: Are others able to run: heroku rake db:migrate OR heroku console
>>> "puts Model.count" ?
>>
>>> This is probably user error, but I can't figure it out. reminds me of not
>>> specifying RAILS_ENV when running rails console.
>>
>>> I had run rake db:seed which populated the Avatar model.
>>> I view a page on the website that relies upon the Avatar model.
>>> I ran heroku config:add RAILS_ENV=production (just in case)
>>
>>> But from heroku console:
>>
>>> *> puts Avatar.count*
>>> ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars" does
>>> not exist
>>> : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
>>> d.adsrc, a.attnotnull
>>>   FROM pg_attribute a LEFT JOIN pg_attrdef d
>>> ON a.attrelid = d.adrelid AND a.attnum = d.adnum
>>>  WHERE a.attrelid = '"avatars"'::regclass
>>>AND a.attnum > 0 AND NOT a.attisdropped
>>>  ORDER BY a.attnum
>>
>>> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
>>> ection_adapters/abstract_adapter.rb:207:in
>>> `rescue in log'
>>> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
>>> ection_adapters/abstract_adapter.rb:199:in
>>> `log'
>>> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
>>> ection_adapters/postgresql_adapter.rb:501:in
>>> `query'
>>> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
>>> ection_adapters/postgresql_adapter.rb:1037:in
>>> `column_definitions'
>>
>>> *> heroku rake db:migrate*
>>
>>> (in /app)
>>> rake aborted!
>>> uninitialized constant Rake::DSL
>>> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
>>> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
>>> `'
>>> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
>>> `'
>>> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `>> (required)>'
>>> /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
>>> /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `>> (required)>'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
>>> ion.rake:2:in
>>> `require'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
>>> ion.rake:2:in
>>> `'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
>>> `load'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
>>> `block in '
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
>>> `each'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
>>> `'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
>>> 15:in
>>> `require'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
>>> 15:in
>>> `initialize_tasks'
>>> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:1 
>>> 39:in
>>> `load_tasks'
>>

Re: Anyone having trouble using heroku console?

2011-07-14 Thread Francois
Terence
 this error has been happening to a lot of people, it might be worth
mentioning this in the docs somewhere? I searched for 'uninitialized
constant Rake::DSL' in the docs and there was no mention.

- F

On Jul 14, 10:53 am, Terence Lee  wrote:
> Hello Keenan,
>
> It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
> that's the one being called here. We're looking into ways to fix this. In
> the meantime, can you try hard coding your rake to 0.8.7 in your Gemfile?
> Once you have that working locally, it should work fine on heroku.
>
> Best,
> Terence
>
>
>
> On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock  wrote:
> >  Hi,
>
> > Question: Are others able to run: heroku rake db:migrate OR heroku console
> > "puts Model.count" ?
>
> > This is probably user error, but I can't figure it out. reminds me of not
> > specifying RAILS_ENV when running rails console.
>
> > I had run rake db:seed which populated the Avatar model.
> > I view a page on the website that relies upon the Avatar model.
> > I ran heroku config:add RAILS_ENV=production (just in case)
>
> > But from heroku console:
>
> > *> puts Avatar.count*
> > ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars" does
> > not exist
> > :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
> > d.adsrc, a.attnotnull
> >               FROM pg_attribute a LEFT JOIN pg_attrdef d
> >                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
> >              WHERE a.attrelid = '"avatars"'::regclass
> >                AND a.attnum > 0 AND NOT a.attisdropped
> >              ORDER BY a.attnum
>
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/abstract_adapter.rb:207:in
> > `rescue in log'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/abstract_adapter.rb:199:in
> > `log'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/postgresql_adapter.rb:501:in
> > `query'
> > /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/conn 
> > ection_adapters/postgresql_adapter.rb:1037:in
> > `column_definitions'
>
> > *> heroku rake db:migrate*
>
> > (in /app)
> > rake aborted!
> > uninitialized constant Rake::DSL
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in ` > (required)>'
> > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in ` > (required)>'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
> > ion.rake:2:in
> > `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
> > ion.rake:2:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > `load'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> > `block in '
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > `each'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> > `'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
> > 15:in
> > `require'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
> > 15:in
> > `initialize_tasks'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:1 
> > 39:in
> > `load_tasks'
> > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:7 
> > 7:in
> > `method_missing'
> > /app/Rakefile:7:in `'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
> > /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
> > /us

Re: Anyone having trouble using heroku console?

2011-07-14 Thread Terence Lee
Hello Keenan,

It's because rake is built into ruby 1.9.2 and the version is 0.8.7 and
that's the one being called here. We're looking into ways to fix this. In
the meantime, can you try hard coding your rake to 0.8.7 in your Gemfile?
Once you have that working locally, it should work fine on heroku.

Best,
Terence

On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock  wrote:

>  Hi,
>
> Question: Are others able to run: heroku rake db:migrate OR heroku console
> "puts Model.count" ?
>
> This is probably user error, but I can't figure it out. reminds me of not
> specifying RAILS_ENV when running rails console.
>
> I had run rake db:seed which populated the Avatar model.
> I view a page on the website that relies upon the Avatar model.
> I ran heroku config:add RAILS_ENV=production (just in case)
>
> But from heroku console:
>
> *> puts Avatar.count*
> ActiveRecord::StatementInvalid: PGError: ERROR:  relation "avatars" does
> not exist
> : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
> d.adsrc, a.attnotnull
>   FROM pg_attribute a LEFT JOIN pg_attrdef d
> ON a.attrelid = d.adrelid AND a.attnum = d.adnum
>  WHERE a.attrelid = '"avatars"'::regclass
>AND a.attnum > 0 AND NOT a.attisdropped
>  ORDER BY a.attnum
>
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:207:in
> `rescue in log'
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:199:in
> `log'
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:501:in
> `query'
> /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:1037:in
> `column_definitions'
>
>
> *> heroku rake db:migrate*
>
> (in /app)
> rake aborted!
> uninitialized constant Rake::DSL
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
> `'
> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
> `'
> /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in ` (required)>'
> /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
> /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in ` (required)>'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
> `require'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
> `'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> `load'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
> `block in '
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> `each'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
> `'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
> `require'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
> `initialize_tasks'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:in
> `load_tasks'
> /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:in
> `method_missing'
> /app/Rakefile:7:in `'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
> /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
> /usr/ruby1.9.2/bin/rake:31:in `'
>
>
> Thanks for any pointers on what I am doing wrong,
> Keenan
>
> --Keenan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to heroku@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 heroku@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.



Anyone having trouble using heroku console?

2011-07-13 Thread Keenan Brock
Hi,

Question: Are others able to run: heroku rake db:migrate OR heroku console 
"puts Model.count" ?

This is probably user error, but I can't figure it out. reminds me of not 
specifying RAILS_ENV when running rails console.

I had run rake db:seed which populated the Avatar model.
I view a page on the website that relies upon the Avatar model.
I ran heroku config:add RAILS_ENV=production (just in case)

But from heroku console:

> puts Avatar.count
ActiveRecord::StatementInvalid: PGError: ERROR: relation "avatars" does not 
exist
:  SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
 WHERE a.attrelid = '"avatars"'::regclass
 AND a.attnum > 0 AND NOT a.attisdropped
 ORDER BY a.attnum

/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:207:in
 `rescue in log'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:199:in
 `log'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:501:in
 `query'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:1037:in
 `column_definitions'


> heroku rake db:migrate

(in /app)
rake aborted!
uninitialized constant Rake::DSL
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in 
`'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in 
`'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
 `require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
 `'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in 
`block in '
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
 `require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
 `initialize_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:in
 `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:in 
`method_missing'
/app/Rakefile:7:in `'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `'


Thanks for any pointers on what I am doing wrong,
Keenan

--Keenan 

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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.



how do i request a full stack trace in heroku console

2011-05-20 Thread fearless_fool
The following interaction works fine in my local development
environment  but fails on Heroku:

$ heroku console
>> p = Premise.new(:address => "555 University Ave", :user => User.first)
=> #
>> p.save
NoMethodError: undefined method `name' for nil:NilClass
/app/.bundle/gems/ruby/1.9.1/gems/arel-2.0.9/lib/arel/visitors/
to_sql.rb:57:in `block in visit_Arel_Nodes_InsertStatement'
/app/.bundle/gems/ruby/1.9.1/gems/arel-2.0.9/lib/arel/visitors/
to_sql.rb:56:in `map'
/app/.bundle/gems/ruby/1.9.1/gems/arel-2.0.9/lib/arel/visitors/
to_sql.rb:56:in `visit_Arel_Nodes_InsertStatement'
/app/.bundle/gems/ruby/1.9.1/gems/arel-2.0.9/lib/arel/visitors/
visitor.rb:15:in `visit'

Unfortunately, with the truncated backtrace, I cannot tell what part
of my code triggered the error.  Is there a way to view the full
backtrace?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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.



Hirb in Heroku Console?

2011-01-27 Thread Geek Active
I've been using Hirb in my local development environment, but can't
figure out how to enable it in the Heroku console. I have it in my
Gemfile and pushed onto Heroku, but objects still aren't displaying as
easy-to-read tables. Any suggestions? Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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: Heroku Console and Gems

2010-08-30 Thread Scott LaBounty
OK, still not working. Here's my .gems file:

<<
ramaze
sequel
ruby-pg
>>

Here's my rakefile (stripped of everything except this) note the added
require 'rubygems'.

<<
namespace :db do
require 'rubygems'
require 'sequel'
Sequel.extension :migration

task :migrate do
m = Sequel::Migrator
db = Sequel.connect(ENV['DATABASE_URL'] ||
'sqlite://library.sqlite')
dir = "dbMigration"
version = ENV['VERSION'] ? "#{ENV['VERSION']}" : ""
puts "m = #{m} db = #{db} dir = #{dir} version = #{version}"
m.apply(db, dir)
end
end


>>

I did a:

<<
# heroku db:reset --app stark-ocean-49
Warning: All data in the 'stark-ocean-49' database will be erased and will
not be recoverable.
Are you sure you wish to continue? (y/n)? y
Database reset for 'stark-ocean-49' (http://stark-ocean-49.heroku.com/)
>>

followed by a:

<<
# heroku rake db:migrate
(in /disk1/home/slugs/265355_5b426d8_a5aa/mnt)
m = Sequel::Migrator db = # dir =
dbMigration version =

>>

So it looks like something ran (I have a migrator and the database looks
feasible).

When I run though I get ... it working. Interesting because it wasn't
working, but when I went back and refreshed, it looks like it started. Would
there be a delay before the migration happened possibly?

Anyway, thanks for all the help. I'll write this up and post it on my blog.

Scott

On Sun, Aug 29, 2010 at 9:18 AM, chris  wrote:

> .gems isn't deprecated, in fact it's the preferred way to explain what
> gems your app requires. "Gem Bundler is under active development, and
> is not recommended for production use yet." says
> http://docs.heroku.com/bundler
>
> That being said, all the .gems file does is install the specified gems
> into your slug. See: http://docs.heroku.com/slug-compiler
>
> In order to use the gems in your application (& in rake or the
> console), you might have to "require 'rubygems'" and then require
> specific the specific gem lib, i.e. "require 'sequel'" -- then you
> should be able to use Sequel in your app.
>
> Bundler is a little fancier and will try to auto-require the gem. You
> can also tell it explicitly what file you're looking to require, i.e.
> "gem 'rspec', :require => 'spec'"
>
> On Aug 27, 4:37 pm, David Balatero  wrote:
> > Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
> > install.
> >
> > Your Rails app has to define gems in config/environment.rb w/ config.gem
> > directives.
> >
> > Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
> >
> > On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty 
> wrote:
> > > Should the gems that are in my .gems file be available to me in the
> Heroku
> > > console? Are they available from my rakefile?
> >
> > > Thanks,
> >
> > > --
> > > Scott
> > >http://steamcode.blogspot.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.
>
>


-- 
Scott
http://steamcode.blogspot.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: Heroku Console and Gems

2010-08-29 Thread chris
.gems isn't deprecated, in fact it's the preferred way to explain what
gems your app requires. "Gem Bundler is under active development, and
is not recommended for production use yet." says http://docs.heroku.com/bundler

That being said, all the .gems file does is install the specified gems
into your slug. See: http://docs.heroku.com/slug-compiler

In order to use the gems in your application (& in rake or the
console), you might have to "require 'rubygems'" and then require
specific the specific gem lib, i.e. "require 'sequel'" -- then you
should be able to use Sequel in your app.

Bundler is a little fancier and will try to auto-require the gem. You
can also tell it explicitly what file you're looking to require, i.e.
"gem 'rspec', :require => 'spec'"

On Aug 27, 4:37 pm, David Balatero  wrote:
> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
> install.
>
> Your Rails app has to define gems in config/environment.rb w/ config.gem
> directives.
>
> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>
> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty  wrote:
> > Should the gems that are in my .gems file be available to me in the Heroku
> > console? Are they available from my rakefile?
>
> > Thanks,
>
> > --
> > Scott
> >http://steamcode.blogspot.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: Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
David,

Thanks, I'll take a look at using Bundler.

For those of you wondering, I'm still trying to get migrations to work from
Sequel. I've grabbed a bit of code from sequel for migrations, put it into
my rakefile, but it's still not working. It looks like the require 'sequel'
doesn't happen (or at least that's my impression from doing the same thing
in the heroku console).

Scott

On Fri, Aug 27, 2010 at 1:58 PM, David Balatero  wrote:

> I believe so, as long as the Rakefile + your app loaded Bundler.
>
>
> On Fri, Aug 27, 2010 at 1:44 PM, Scott LaBounty wrote:
>
>> Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
>> the gems be available via rake and the console?
>>
>> Scott
>>
>>
>> On Fri, Aug 27, 2010 at 1:37 PM, David Balatero wrote:
>>
>>> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
>>> install.
>>>
>>> Your Rails app has to define gems in config/environment.rb w/ config.gem
>>> directives.
>>>
>>> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>>>
>>> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>>>
>>>> Should the gems that are in my .gems file be available to me in the
>>>> Heroku console? Are they available from my rakefile?
>>>>
>>>> Thanks,
>>>>
>>>> --
>>>> Scott
>>>> http://steamcode.blogspot.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.
>>>
>>
>>
>>
>> --
>> Scott
>> http://steamcode.blogspot.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.
>



-- 
Scott
http://steamcode.blogspot.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: Heroku Console and Gems

2010-08-27 Thread David Balatero
I believe so, as long as the Rakefile + your app loaded Bundler.

On Fri, Aug 27, 2010 at 1:44 PM, Scott LaBounty  wrote:

> Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
> the gems be available via rake and the console?
>
> Scott
>
>
> On Fri, Aug 27, 2010 at 1:37 PM, David Balatero wrote:
>
>> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
>> install.
>>
>> Your Rails app has to define gems in config/environment.rb w/ config.gem
>> directives.
>>
>> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>>
>> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>>
>>> Should the gems that are in my .gems file be available to me in the
>>> Heroku console? Are they available from my rakefile?
>>>
>>> Thanks,
>>>
>>> --
>>> Scott
>>> http://steamcode.blogspot.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.
>>
>
>
>
> --
> Scott
> http://steamcode.blogspot.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: Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
Hmm... I'm not using Rails. If I do make the switch to Bundler/Gems would
the gems be available via rake and the console?

Scott

On Fri, Aug 27, 2010 at 1:37 PM, David Balatero  wrote:

> Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
> install.
>
> Your Rails app has to define gems in config/environment.rb w/ config.gem
> directives.
>
> Alternatively, switch to Bundler + Gemfile, and manage gems in one place.
>
> On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty wrote:
>
>> Should the gems that are in my .gems file be available to me in the Heroku
>> console? Are they available from my rakefile?
>>
>> Thanks,
>>
>> --
>> Scott
>> http://steamcode.blogspot.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.
>



-- 
Scott
http://steamcode.blogspot.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: Heroku Console and Gems

2010-08-27 Thread David Balatero
Not necessarily. .gems is deprecated IIRC, and only tells Heroku what to
install.

Your Rails app has to define gems in config/environment.rb w/ config.gem
directives.

Alternatively, switch to Bundler + Gemfile, and manage gems in one place.

On Fri, Aug 27, 2010 at 1:35 PM, Scott LaBounty  wrote:

> Should the gems that are in my .gems file be available to me in the Heroku
> console? Are they available from my rakefile?
>
> Thanks,
>
> --
> Scott
> http://steamcode.blogspot.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.



Heroku Console and Gems

2010-08-27 Thread Scott LaBounty
Should the gems that are in my .gems file be available to me in the Heroku
console? Are they available from my rakefile?

Thanks,

-- 
Scott
http://steamcode.blogspot.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: Heroku console crashing

2010-08-02 Thread Mike
Wow, thanks, that sql console looks amazing! How come Heroku doesn't
fold this into its official tools?

Regarding using db:pull, maintenance, followed by db:push, that
technique was extremely troublesome for me in the past, probably
because my database is big, around 5 GB. When uploading on db:push,
the initial ETA starts low, and then shoots up the longer it runs
(mine starts at 8 and then takes around 36 hours total). This
combined, with the fact that the db:push process seems to be fragile
means anytime I use push my site will be down for a while.

Last time I used it, my first attempt to push the database died after
about 24 hours with a Taps error (which I reported to support already)
where it spuriously complained that there was a duplicate key in the
primary keys of a table. My second attempt to push the database died
after another day when I briefly lost my Internet connection. The
third attempt successfully pushed it up, but I really want to avoid
using the push/pull tools on my site again unless necessary.

I will definitely check out the console, seems like just the ticket
for this sort of thing.

On Aug 2, 1:34 pm, Oren Teich  wrote:
> Also check outhttp://github.com/ddollar/heroku-sql-console
>
>
>
> On Mon, Aug 2, 2010 at 9:15 AM, Jonathan  wrote:
> > Running database transactions through this remote console setup is
> > iffy...  It might work better to do a db:pull (ideally of just the
> > tables you want to change), do the database maintenance locally, and
> > then push the updated tables.  You can put the site into maintenance
> > mode while you do this, if necessary.  This technique works reasonably
> > well for me.
>
> > On Aug 1, 6:44 pm, Mike  wrote:
> >> I'm updating some data in my database, and running them through the
> >> Heroku console since we have no direct database access...
>
> > --
> > 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 
> > athttp://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: Heroku console crashing

2010-08-02 Thread Oren Teich
Also check out
http://github.com/ddollar/heroku-sql-console

On Mon, Aug 2, 2010 at 9:15 AM, Jonathan  wrote:
> Running database transactions through this remote console setup is
> iffy...  It might work better to do a db:pull (ideally of just the
> tables you want to change), do the database maintenance locally, and
> then push the updated tables.  You can put the site into maintenance
> mode while you do this, if necessary.  This technique works reasonably
> well for me.
>
> On Aug 1, 6:44 pm, Mike  wrote:
>> I'm updating some data in my database, and running them through the
>> Heroku console since we have no direct database access...
>
> --
> 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: Heroku console crashing

2010-08-02 Thread Jonathan
Running database transactions through this remote console setup is
iffy...  It might work better to do a db:pull (ideally of just the
tables you want to change), do the database maintenance locally, and
then push the updated tables.  You can put the site into maintenance
mode while you do this, if necessary.  This technique works reasonably
well for me.

On Aug 1, 6:44 pm, Mike  wrote:
> I'm updating some data in my database, and running them through the
> Heroku console since we have no direct database access...

-- 
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: Heroku console crashing

2010-08-01 Thread Oren Teich
That's how Heroku works -
http://docs.heroku.com/performance#request-timeout.  A console command
is treated identically to a HTTP request.

Oren

On Sun, Aug 1, 2010 at 6:57 PM, Mike  wrote:
> Okay, actually fixed this, sort of, by updating my heroku gem.
>
> Now it now longer crashes and just quits the console and tells me that
> it's timed out and I should run it as a rake task instead of from the
> console.
>
> Overall behavior seems to be the same still, with the request
> continuing to run on the dyno until completed.
>
> On Aug 1, 9:44 pm, Mike  wrote:
>> I'm updating some data in my database, and running them through the
>> Heroku console since we have no direct database access.
>>
>> I'm calling this like so: ActiveRecord::Base.connection.execute "MY
>> SQL COMMAND;"
>>
>> The command takes about 5-10 minutes to run.
>>
>> Every time I run it, it's causing the console to crash, with the
>> following message:
>> /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/client.rb:202:in
>> `console': undefined method `code' for nil:NilClass (NoMethodError)
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
>> 158:in `console_session'
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
>> 147:in `console'
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
>> `send'
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
>> `run_internal'
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:20:in
>> `run'
>>         from /var/lib/gems/1.8/gems/heroku-1.9.9/bin/heroku:13
>>         from /var/lib/gems/1.8/bin/heroku:19:in `load'
>>         from /var/lib/gems/1.8/bin/heroku:19
>>
>> After that, apparently the command is continuing to run even though I
>> have no access to the console, as for about the runtime of my command,
>> the dyno continues to be completely tied up and non-responsive.
>> Afterwards, I can connect to the console again, and the data appears
>> upon first inspection to have been changed.
>>
>> Has anyone else seen behavior like this? Did your data integrity turn
>> out okay in the 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: Heroku console crashing

2010-08-01 Thread Mike
Okay, actually fixed this, sort of, by updating my heroku gem.

Now it now longer crashes and just quits the console and tells me that
it's timed out and I should run it as a rake task instead of from the
console.

Overall behavior seems to be the same still, with the request
continuing to run on the dyno until completed.

On Aug 1, 9:44 pm, Mike  wrote:
> I'm updating some data in my database, and running them through the
> Heroku console since we have no direct database access.
>
> I'm calling this like so: ActiveRecord::Base.connection.execute "MY
> SQL COMMAND;"
>
> The command takes about 5-10 minutes to run.
>
> Every time I run it, it's causing the console to crash, with the
> following message:
> /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/client.rb:202:in
> `console': undefined method `code' for nil:NilClass (NoMethodError)
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
> 158:in `console_session'
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
> 147:in `console'
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
> `send'
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
> `run_internal'
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:20:in
> `run'
>         from /var/lib/gems/1.8/gems/heroku-1.9.9/bin/heroku:13
>         from /var/lib/gems/1.8/bin/heroku:19:in `load'
>         from /var/lib/gems/1.8/bin/heroku:19
>
> After that, apparently the command is continuing to run even though I
> have no access to the console, as for about the runtime of my command,
> the dyno continues to be completely tied up and non-responsive.
> Afterwards, I can connect to the console again, and the data appears
> upon first inspection to have been changed.
>
> Has anyone else seen behavior like this? Did your data integrity turn
> out okay in the 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.



Heroku console crashing

2010-08-01 Thread Mike
I'm updating some data in my database, and running them through the
Heroku console since we have no direct database access.

I'm calling this like so: ActiveRecord::Base.connection.execute "MY
SQL COMMAND;"

The command takes about 5-10 minutes to run.

Every time I run it, it's causing the console to crash, with the
following message:
/var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/client.rb:202:in
`console': undefined method `code' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
158:in `console_session'
from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/commands/app.rb:
147:in `console'
from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
`send'
from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:48:in
`run_internal'
from /var/lib/gems/1.8/gems/heroku-1.9.9/lib/heroku/command.rb:20:in
`run'
from /var/lib/gems/1.8/gems/heroku-1.9.9/bin/heroku:13
from /var/lib/gems/1.8/bin/heroku:19:in `load'
from /var/lib/gems/1.8/bin/heroku:19

After that, apparently the command is continuing to run even though I
have no access to the console, as for about the runtime of my command,
the dyno continues to be completely tied up and non-responsive.
Afterwards, I can connect to the console again, and the data appears
upon first inspection to have been changed.

Has anyone else seen behavior like this? Did your data integrity turn
out okay in the 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.



How are dynos related to cron jobs and heroku console?

2010-03-21 Thread Mike
When you run something as a cron job or when you execute a task from
the Heroku console, do these run on one of your applications dynos? Or
are these type of non-conventional processes their own thing?

If they do run on a dyno, does Heroku recognize it if that dyno is
slower performing and send correspondingly more web traffic to the
other dynos?

-- 
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: heroku console: ^C should clear, not exit.

2009-05-27 Thread Adam Wiggins
On Wed, May 27, 2009 at 1:27 PM, Harry Vangberg  wrote:

> I didn't realize the heroku console was on GitHub, will take a look
> at it.
>

http://github.com/heroku/heroku/blob/85693066c72f86595f03ebeae338134b162639d8/lib/heroku/commands/app.rb#L115-128

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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: heroku console: ^C should clear, not exit.

2009-05-27 Thread Harry Vangberg

Ha, that's weird. ^C clears on every system I've tried, including OS
X. I didn't realize the heroku console was on GitHub, will take a look
at it.

2009/5/27 Adam Wiggins :
> Ctrl-D does exit the Heroku console as long as you at the start of a line.
>  It's behavior is identical to irb and bash in that regard.
> Ctrl-C is a funny one.  I experimented with irb, and on OS X it doesn't seem
> to do anything, although the behavior is very quirkly.  On Linux it clears
> the line like you said.  Maybe this has to do with differences in the
> gettext library on BSD vs Linux?  In any case, I agree that it should follow
> whatever irb does on your current platform.  Please feel free to submit
> patches to heroku-client on github. :)
> Adam
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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: heroku console: ^C should clear, not exit.

2009-05-27 Thread Adam Wiggins
Ctrl-D does exit the Heroku console as long as you at the start of a line.
 It's behavior is identical to irb and bash in that regard.
Ctrl-C is a funny one.  I experimented with irb, and on OS X it doesn't seem
to do anything, although the behavior is very quirkly.  On Linux it clears
the line like you said.  Maybe this has to do with differences in the
gettext library on BSD vs Linux?  In any case, I agree that it should follow
whatever irb does on your current platform.  Please feel free to submit
patches to heroku-client on github. :)

Adam

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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
-~--~~~~--~~--~--~---



heroku console: ^C should clear, not exit.

2009-05-27 Thread Harry Vangberg

I'm repeatedly being caught off-guard in the Heroku console: ^C exits
the console, while ^D does nothing.
In practically every other console/shell/whatevz, including IRB, ^C
clears the input line and ^D exits.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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: Heroku console

2009-04-16 Thread Robert Sköld

I found it finally by using the trusty google, for anyone interested
this is how it's done:

irb -r sinatra_app.rb

I found it here: http://gist.github.com/74761 among with some other
tricks.

On Apr 16, 12:33 pm, Robert Sköld  wrote:
> The heroku console can be a real time saver sometimes, just like the
> rails script/console. The magic about the heroku console is that it
> also works on a non-rails application like sinatra (any rack served
> app maybe?).
>
> I wonder, is there any way of doing the same thing locally on a
> sinatra/rack application?
>
> best,
>
> /bob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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
-~--~~~~--~~--~--~---



Heroku console

2009-04-16 Thread Robert Sköld

The heroku console can be a real time saver sometimes, just like the
rails script/console. The magic about the heroku console is that it
also works on a non-rails application like sinatra (any rack served
app maybe?).

I wonder, is there any way of doing the same thing locally on a
sinatra/rack application?

best,

/bob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@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
-~--~~~~--~~--~--~---