processes dying, not being restarted

2015-05-31 Thread Chris Curvey
I have a Django-based app running on Heroku.  One web request can generate 
hundreds of sub-jobs, which are queued up through django-rq and RedisToGo. 
 Over time, I've noticed that the rate of processing from the queue drops, 
and if I look at the admin page in django-rq, it says that there are fewer 
and fewer workers drawing from the queue. 

This strikes me as strange for two reasons:

1) The number of dynos that are supposedly working the queue remains 
constant in the heroku web interface
2) The queue-handling jobs themselves are written so that they handle any 
unexpected error condition.  They should never stop, they should log an 
error and move to the next job.

has anyone seen anything like this before?  Any idea how I can keep my jobs 
going without having to restart the dynos?


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using custom tsearch dictionaries

2014-06-11 Thread Chris Martin
Hi Peter.  Thanks for responding.

We have application running on Heroku. and we need to implement full text
search.  The features in PostgreSQL pretty much meet our needs and the
performance is more than satisfactory.  However we will need to use custom
dictionaries etc..

The word stemming on the standard dictionary doesn't really work for us.
 Our application is a recruitment platform and the standard dictionary
makes matches on roles that are stemmed from the same word, but should be
completely different.  ie:  "*Party* Planner"  and "Chef de *Partie*" both
match the stem word "*parti*"
So we want to add some key words and word combinations to the dictionary.
 and we need to be able to tweak this on a weekly/monthly basis.  we also
need synonyms so that a "Sandwich artist" is the same as a "Sandwich
maker", and "Bar Staff" and "Bar Attendant" are the same.

Then we have qualifications   BE is - Bachelor of Engineering,  but
every where else it is just "be" (a stop word)

We also want to add our own rating functions, so that we can evaluate a
candidates qualifications, skills and work history, against a role. - but I
don't think that this will be a problem.

The issue we face right now is how do we get a custom dictionary / stop
word / thesaurus loaded in our add hosted on Heroko.  We would need to do
this for our production, staging, and demo systems.

I have looked at the elastic search options like Lucene, but there is a lot
of modifications to our application to be able to use solutions like that.
 and we will probably lose some functionality.  We are currently
investigating to see if we can get a "workable" solution even without the
ability to control the dictionary's by just changing the ranking algorithm
only.



On Thu, Jun 12, 2014 at 4:39 AM, Peter van Hardenberg 
wrote:

> Hi Chris,
>
> can you elaborate on the use-case? What problem are you trying to solve?
>
>
> On Tue, Jun 10, 2014 at 6:48 PM,  wrote:
>
>> Hi Peter
>>
>> I have been searching for a solution to this same problem,  So I am very
>> interested in where you got with support for custom dictionaries.
>> I can see three ways to support it
>>   (1) Modify postgress so that the dictionary is keep in a table rather
>> than a file.  - obviously you don't want to modify postgress
>>   (2) The custom dictionary is in a table, but is exported to a file (in
>> the correct location) for use with standard postgress
>>   (3) The custom dictionary is maintained outside postgress and is up
>> loaded using a heroku CLI extension (or via the website)
>>
>>
>>
>>
>> On Sunday, March 3, 2013 10:16:31 AM UTC+11, Peter van Hardenberg wrote:
>>
>>> Hi Nickolay,
>>>
>>> we haven't figured this out yet. Assuming you're on a production plan,
>>> you could email me the requisite dictionary and I can try dropping it in
>>> place for you on an experimental basis. Coming up with a better mechanism
>>> for this is an interesting project. Ideally, it should be something you can
>>> do yourself through some built-in mechanism in Postgres.
>>>
>>>
>>> On Sat, Mar 2, 2013 at 2:56 PM, Nickolay Kolev  wrote:
>>>
>>>> Hi all,
>>>>
>>>> is there a way of adding a text search dictionary and configuration to
>>>> a Heroku Postgres DB? One cannot access $SHAREDIR in order to put the
>>>> dictionary files there, so an alternative is required.
>>>>
>>>> I would not mind putting the dictionary files in migrations if required.
>>>>
>>>> I am very happy with the performance and results of the TSearch2 German
>>>> Compound dictionary and would like to use it in a Heroku-hosted project.
>>>>
>>>> Best,
>>>> Nickolay
>>>>
>>>> --
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Heroku" group.
>>>>
>>>> To unsubscribe from this group, send email to
>>>> heroku+un...@googlegroups.com
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/heroku?hl=en_US?hl=en
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Heroku Community" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to heroku+un...@googlegroups.com.
>>>>
>>>> For more options, visit https://groups.google.com/groups/o

Re: Using custom tsearch dictionaries

2014-06-10 Thread chris
Hi Peter

I have been searching for a solution to this same problem,  So I am very 
interested in where you got with support for custom dictionaries.
I can see three ways to support it
  (1) Modify postgress so that the dictionary is keep in a table rather 
than a file.  - obviously you don't want to modify postgress
  (2) The custom dictionary is in a table, but is exported to a file (in 
the correct location) for use with standard postgress
  (3) The custom dictionary is maintained outside postgress and is up 
loaded using a heroku CLI extension (or via the website)



On Sunday, March 3, 2013 10:16:31 AM UTC+11, Peter van Hardenberg wrote:
>
> Hi Nickolay,
>
> we haven't figured this out yet. Assuming you're on a production plan, you 
> could email me the requisite dictionary and I can try dropping it in place 
> for you on an experimental basis. Coming up with a better mechanism for 
> this is an interesting project. Ideally, it should be something you can do 
> yourself through some built-in mechanism in Postgres.
>
>
> On Sat, Mar 2, 2013 at 2:56 PM, Nickolay Kolev  > wrote:
>
>> Hi all,
>>
>> is there a way of adding a text search dictionary and configuration to a 
>> Heroku Postgres DB? One cannot access $SHAREDIR in order to put the 
>> dictionary files there, so an alternative is required.
>>
>> I would not mind putting the dictionary files in migrations if required.
>>
>> I am very happy with the performance and results of the TSearch2 German 
>> Compound dictionary and would like to use it in a Heroku-hosted project.
>>
>> Best,
>> Nickolay
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Heroku" group.
>>  
>> To unsubscribe from this group, send email to
>> heroku+un...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/heroku?hl=en_US?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Heroku Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to heroku+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Running Grails application which requires ~3GB on the heap - possible in heroku?

2012-04-20 Thread Chris Hanks
It's not possible, sorry. A single dyno is limited to 512 MB of RAM (see 
the Acceptable Use Policy: http://policy.heroku.com/aup). And cranking up 
the dynos won't help, because their RAM won't pool (and Heroku goes out of 
its way to split your dynos across different machines anyway).


On Friday, April 20, 2012 7:46:40 AM UTC-7, Chris wrote:
>
> Hi, 
>
> I'm slightly confused as to whether it is possible to run an 
> application on Heroku that requires around 3GB on the heap. This does 
> seem a lot, but it's not a memory leak - it is just that it is 
> necessary to have around 3,000,000 objects in memory at a certain time 
> (yes, I will be reviewing just how 'necessary' it is, and what 
> alternatives there are, but for now lets say it's necessary). 
>
> So, this long running task would be handled by a Worker Dyno, rather 
> than a Web Dyno? Are the limitations/capabilities of the Worker Dynos 
> the same as the Web Dynos? And by cranking up the number of Dynos, can 
> I run my application that will require say 3GB for one process, or is 
> this just not possible? 
>
> Sorry for the noob questions ... but I am a noob, and I've seen 
> conflicting information, so want to get the facts straight. 
>
> Cheers, 
>
> Chris

-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en


Running Grails application which requires ~3GB on the heap - possible in heroku?

2012-04-20 Thread Chris
Hi,

I'm slightly confused as to whether it is possible to run an
application on Heroku that requires around 3GB on the heap. This does
seem a lot, but it's not a memory leak - it is just that it is
necessary to have around 3,000,000 objects in memory at a certain time
(yes, I will be reviewing just how 'necessary' it is, and what
alternatives there are, but for now lets say it's necessary).

So, this long running task would be handled by a Worker Dyno, rather
than a Web Dyno? Are the limitations/capabilities of the Worker Dynos
the same as the Web Dynos? And by cranking up the number of Dynos, can
I run my application that will require say 3GB for one process, or is
this just not possible?

Sorry for the noob questions ... but I am a noob, and I've seen
conflicting information, so want to get the facts straight.

Cheers,

Chris

-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

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_US?hl=en


Play 1.2.4 on Heroku with "secure" module -> "module not found"

2012-03-09 Thread Chris
Hi All,

I'm attempting to get my first Play 1.2.4 based application deployed to 
Heroku.  Everything went smoothly, including the first push.  

I then checked "heroku logs" and found the following error: 
*2012-03-03T23:10:54+00:00 
app[web.1]: ~ Module not found: /app/.play/modules/secure*
*
*
This snag is holding me back, has anyone experienced this issue before? 
 Thanks!

Posting my dependencies.yml:
*# Application dependencies*
*require:
*
*- play -> play [1.2.4,)*
*- play -> siena [2.0.6,)*
*- play -> secure*
*
*
*The entire log is below...*
2012-03-03T23:10:54+00:00 app[web.1]: ~ play! 1.2.4, 
http://www.playframework.org
2012-03-03T23:10:54+00:00 app[web.1]: ~
2012-03-03T23:10:54+00:00 app[web.1]: ~ framework ID is prod
2012-03-03T23:10:54+00:00 app[web.1]: ~
2012-03-03T23:10:54+00:00 app[web.1]: ~ Oops,
*2012-03-03T23:10:54+00:00 app[web.1]: ~ Module not found: 
/app/.play/modules/secure*
2012-03-03T23:10:54+00:00 app[web.1]: ~
2012-03-03T23:10:55+00:00 heroku[web.1]: Process exited with status 255
2012-03-03T23:10:55+00:00 heroku[web.1]: State changed from starting to 
crashed
2012-03-03T23:12:27+00:00 heroku[router]: Error H10 (App crashed) -> GET 
stormy-fog-7566.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/heroku/-/Yl1ahJBl42AJ.
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: Background job guidance

2011-12-08 Thread chris
Heroku recently released the Scheduler add-on, for small-ish tasks:

http://blog.heroku.com/archives/2011/11/12/heroku_scheduler_add_on_now_available/

http://devcenter.heroku.com/articles/scheduler

The included admin panel is quite nice.  (All free, except for dyno usage.)

On Thu, December 8, 2011 6:50 am, Neil Middleton wrote:
> The only thing I've seen worth mentioning is that Heroku recommend using
> this fork of Resque:
>
> http://github.com/hone/resque.git
>
> In particular the keepalive branch.  I'm unclear as to why.
>
> Neil
>
>
> On Thursday, 8 December 2011 at 14:46, Chap wrote:
>
>> Delayed Job has long been supported on heroku and I've had no issues
>> with it.
>>
>> Here's a couple of docs I would recommend you read:
>> http://devcenter.heroku.com/articles/queueing
>> http://devcenter.heroku.com/articles/delayed-job
>>
>> (It does seem that resque is the new favorite in the rails community,
>> but I have yet to give it a try because dj is so darn easy and hasn't
>> failed me yet.)
>>
>> On Dec 7, 7:53 pm, djangst http://gmail.com)>
>> wrote:
>> > Hi, I'm looking for current advice on running background jobs on
>> > Heroku, most likely for a Rails app.
>> >
>> > Are there any particular gotchas to be aware of?
>> >
>> > Is there a preferred option among those available, such as Resque?
>> >
>> > Anything else? 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
>> (mailto:heroku@googlegroups.com).
>> To unsubscribe from this group, send email to
>> heroku+unsubscr...@googlegroups.com
>> (mailto: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.
>
>


-- 
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.



Rails caching in mongo, across dynos

2011-12-05 Thread chris
We pay Heroku for hosting our Rails app, with several dynos & workers, as
well as MongoLab services, etc.

Our app is on Cedar and we're looking to improve performance by
implementing Rails caching in mongoDB.  Will John Nunemaker's "bin" gem
work best?  (It works well in development.)  Or is there a better option?

Among other things, I'm concerned that cached information will not be
shared across dynos if "bin" / Rails / heroku configs are not correct.

Thanks for anyone who can help.


-- 
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: Flushing memcache with Dalli

2011-10-16 Thread Chris Eigner
Matt,

This is what I did as well. I put it in a route and wired up a Heroku deploy 
hook so the cache is cleared on every 
deploy. http://devcenter.heroku.com/articles/deploy-hooks

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/heroku/-/XnEz4LVXhf0J.
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.



getting started

2011-09-29 Thread Chris Finch
Hi , sorry for the newb question but I followed the getting started
with Heroku guide, got to the heroku rake db:migrate part and get the
following:


rake aborted!
Please install the postgresql adapter: `gem install activerecord-
postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)


activerecord-postgresql-adapter doesn't exist - what do I do?

Chris.

-- 
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: Config var unavailability during asset precompilation.

2011-09-13 Thread Chris Hanks
I wound up solving this by establishing the DB connection unless
Rails.env.production? && Rails.groups.include?('assets'). It seems to
work alright.

On Sep 13, 12:22 pm, Chris Hanks 
wrote:
> I'm using Sequel with Rails 3.1.0, and connecting to my database by
> simply passing a database url in a config var to Sequel.connect - the
> standard way of doing it. It seems that when Heroku runs the asset
> precompilation rake task during a deploy, my config vars apparently
> aren't available to the app as it's initializing. Without a database
> to connect to, it crashes.
>
> I could simply hack my way around this by rescuing from the connection
> error, but I think that's a bad idea, since my app relies on the
> database for all of its functionality - if the database is
> unavailable, the app SHOULD be crashing when it's trying to establish
> its connection. I think it makes more sense for my config vars to be
> available to the app during asset compilation, but I'm not sure why
> they're not already.
>
> Can someone from Heroku shed some light on this? 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.



Config var unavailability during asset precompilation.

2011-09-13 Thread Chris Hanks
I'm using Sequel with Rails 3.1.0, and connecting to my database by
simply passing a database url in a config var to Sequel.connect - the
standard way of doing it. It seems that when Heroku runs the asset
precompilation rake task during a deploy, my config vars apparently
aren't available to the app as it's initializing. Without a database
to connect to, it crashes.

I could simply hack my way around this by rescuing from the connection
error, but I think that's a bad idea, since my app relies on the
database for all of its functionality - if the database is
unavailable, the app SHOULD be crashing when it's trying to establish
its connection. I think it makes more sense for my config vars to be
available to the app during asset compilation, but I'm not sure why
they're not already.

Can someone from Heroku shed some light on this? 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: Gzip not available on Cedar?

2011-06-03 Thread Chris Hanks
No problem. The issue with HTML pages not being Gzipped resolved
itself somehow - now everything's being compressed just as it should
be. The downside is that it ties up the dyno, and adds about 5-10 ms
of processing time to my heavier pages. It would be great if Heroku
could get Nginx handling this again, but oh well. Now I'm able to run
three Rails instances on each dyno (via Unicorn) instead of one, so
the tradeoff is worth it.

Also, I had to rig up a middleware to set 'Cache-Control' headers on
my assets, since that isn't done for you anymore.

The two apps I've switched over are the ones that don't really use
HTTP caching aside from the assets, so losing Varnish isn't a big
deal. I have a third that uses HTTP caching extensively, and I'm
unsure about it. Switching to Rack::Cache might be worth it for the
ability to expire pages from within the app, but I'll have to look
into it some more.


On Jun 3, 10:56 am, John McCaffrey  wrote:
> Thanks for the play by play!
>
>  I didn't get a chance to try out any of my apps on it yet, but I appreciate
> the heads up on some of the things I might run into.
>
> At first the lack of varnish seemed like a big loss, and that it would now
> mean that your app server is requests that used to be served by varnish.
>
> I read through this post on rack
> cache<http://www.saturnflyer.com/blog/jim/2010/06/24/rack-cache-on-heroku-w...>,
> which might not be the most up to date, but it eased my concern somewhat.
>
> Getting the official word on the gzip thing would be nice.
>
> thanks
> -John
>
> On Thu, Jun 2, 2011 at 8:50 PM, Chris Hanks
> wrote:
>
>
>
>
>
>
>
>
>
> > Nevermind, I found Rack::Deflater, and it seems to be Gzipping most
> > things alright (it takes care of the assets, but not HTML, and i'm not
> > sure why).
>
> > On Jun 2, 6:30 pm, Chris Hanks  wrote:
> > > I tried moving an app over to Cedar, and now that I'm looking at it in
> > > Firebug it appears that Heroku isn't gzipping responses anymore. I
> > > knew that I'd have to handle my own http caching since this stack
> > > doesn't use Varnish, but I thought that Gzip was handled by Nginx and
> > > would still be available. Is this another thing we have to handle at
> > > the app level now?
>
> > --
> > 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.
>
> --
> -John

-- 
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: Gzip not available on Cedar?

2011-06-02 Thread Chris Hanks
Nevermind, I found Rack::Deflater, and it seems to be Gzipping most
things alright (it takes care of the assets, but not HTML, and i'm not
sure why).



On Jun 2, 6:30 pm, Chris Hanks  wrote:
> I tried moving an app over to Cedar, and now that I'm looking at it in
> Firebug it appears that Heroku isn't gzipping responses anymore. I
> knew that I'd have to handle my own http caching since this stack
> doesn't use Varnish, but I thought that Gzip was handled by Nginx and
> would still be available. Is this another thing we have to handle at
> the app level now?

-- 
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.



Gzip not available on Cedar?

2011-06-02 Thread Chris Hanks
I tried moving an app over to Cedar, and now that I'm looking at it in
Firebug it appears that Heroku isn't gzipping responses anymore. I
knew that I'd have to handle my own http caching since this stack
doesn't use Varnish, but I thought that Gzip was handled by Nginx and
would still be available. Is this another thing we have to handle at
the app level now?

-- 
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: varnish not caching?

2011-06-01 Thread Chris Hanks
Huh. I remembered seeing somebody from Heroku say that they had their
Varnish servers set up in a hash ring, which I thought would mean this
kind of effect wouldn't happen, but I guess it does. It looks like
they have 10 Varnish servers going - if I use Apache Benchmark to hit
my server with 1000 simultaneous requests it hits my Rails app 10
times before everything starts being served from Varnish.

Anyway, thanks for looking into it, Craayzie.


On Jun 1, 7:24 pm, craayzie  wrote:
> So after hearing back from support it looks like Varnish is caching
> just fine it's just that they have a bunch of Varnish servers and the
> chances of you hitting the same one twice is pretty low. Try firing
> off 10 simultaneous requests and you'll see some of them served from
> Varnish cache. Nice :)

-- 
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: varnish not caching?

2011-06-01 Thread Chris Hanks
I'm seeing the same behavior as craayzie. Redbot shows headers that
look correct:

HTTP/1.1 200 OK
Server: nginx/0.7.67
Date: Wed, 01 Jun 2011 20:16:01 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Last-Modified: Wed, 11 May 2011 19:35:02 GMT
Cache-Control: max-age=86400, public
X-UA-Compatible: IE=Edge,chrome=1
X-Runtime: 0.006309
Content-Length: 403
X-Varnish: 1696646971
Age: 0
Via: 1.1 varnish

If I point Redbot to the same url repeatedly, it shows the same
headers every time, but the logs show that each request is hitting my
rails app. Varnish isn't serving it for some reason.

I'm on Bamboo, so Varnish should be working, it's just... not. This
app is only at one dyno currently.


On May 31, 5:25 pm, craayzie  wrote:
> I'm setting a 'Cache-Control: public, max-age=300' response header per
> the Heroku docs but when I request the resource, Heroku logs show my
> app processing the request and subsequent requests for the same
> resource continue to hit my app.
>
> Any guidance on how to troubleshoot this further to figure out why
> Varnish isn't caching?
>
> Here are the response headers from Heroku:
>
> < HTTP/1.1 200 OK
> < Server: nginx/0.7.67
> < Date: Wed, 01 Jun 2011 00:24:28 GMT
> < Content-Type: text/html; charset=utf-8
> < Connection: keep-alive
> < ETag: "8b8a779a2522e7a42fc663b76a088763"
> < X-UA-Compatible: IE=Edge,chrome=1
> < X-Runtime: 0.047719
> < Cache-Control: public, max-age=300
> < Content-Length: 6921
> < X-Varnish: 1131028875
> < Age: 0
> < Via: 1.1 varnish

-- 
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: Changing static asset cache time

2011-05-29 Thread Chris Hanks
Yeah, Heroku should make this a lot easier. I experimented with one
approach to this a while ago, and it seemed to work fine on my staging
dyno. I haven't gotten around to actually running it in production
yet, though, so use at your own risk:

https://gist.github.com/998124

Let me know how it goes!


On May 29, 1:26 pm, S Wrobel  wrote:
> I'd like my static assets to cache for longer. I think Heroku's default is
> 12 hours, but considering that Rails adds the ?33253523 stuff to them to
> indicate when a new version has been deployed, there's no reason not to
> cache them for months if not years. 12 hours seems way too short for me.
> Does anyone have any feedback on whether this is wise to do, and also how to
> override it?

-- 
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: Rails 3.1 asset pipeline causing 503?

2011-05-20 Thread Chris Hanks
I get this same error frequently on my development machine (Ruby
1.9.2p180 on Ubuntu Natty), so it's not Heroku-specific.


On May 20, 8:01 am, David  wrote:
> Klaus Harti posted this message originally on May 11th and I have it
> in my digest list - I just can't seem to find it on Google Groups.
>
> Anyhow, I'm seeing a similar problem but with this on serving the
> resulting CSS:
> !! Unexpected error while processing request: deadlock; recursive
> locking
>
> Log:
>
> 2011-05-20T08:31:13+00:00 heroku[web.1]: Starting process with
> command: `thin -p 49201 -e production -R /home/heroku_rack/heroku.ru
> start`
> 2011-05-20T08:31:17+00:00 app[web.1]: Starting the New Relic Agent.
> 2011-05-20T08:31:17+00:00 app[web.1]: Installed New Relic Browser
> Monitoring middleware
> 2011-05-20T08:31:19+00:00 app[web.1]: >> Thin web server (v1.2.6
> codename Crazy Delicious)
> 2011-05-20T08:31:19+00:00 app[web.1]: >> Maximum connections set to
> 1024
> 2011-05-20T08:31:19+00:00 app[web.1]: >> Listening on 0.0.0.0:49201,
> CTRL+C to stop
> 2011-05-20T01:31:20-07:00 heroku[web.1]: State changed from starting
> to up
> 2011-05-20T08:31:27+00:00 app[web.1]:
> 2011-05-20T08:31:27+00:00 app[web.1]:
> 2011-05-20T08:31:27+00:00 app[web.1]: Started GET "/" for
> 72.229.127.215 at 2011-05-20 01:31:27 -0700
> 2011-05-20T08:31:27+00:00 app[web.1]:   Processing by
> HomeController#index as HTML
> 2011-05-20T08:31:27+00:00 app[web.1]: Rendered home/index.html.erb
> within layouts/application (15.7ms)
> 2011-05-20T08:31:27+00:00 app[web.1]: [Sprockets] application.css
> building
> 2011-05-20T08:31:27+00:00 app[web.1]: [Sprockets] style.css building
> 2011-05-20T08:31:27+00:00 app[web.1]: [Sprockets] application.js
> building
> 2011-05-20T08:31:27+00:00 app[web.1]: [Sprockets] jquery.js building
> 2011-05-20T08:31:27+00:00 app[web.1]: [Sprockets] jquery_ujs.js
> building
> 2011-05-20T08:31:28+00:00 app[web.1]: Rendered shared/
> _tracking_footer.html.erb (0.4ms)
> 2011-05-20T08:31:28+00:00 app[web.1]: Completed 200 OK in 1417ms
> (Views: 1417.0ms | ActiveRecord: 0.0ms)
> 2011-05-20T08:31:28+00:00 heroku[router]: GET mysite.heroku.com/
> dyno=web.1 queue=0 wait=0ms service=1469ms bytes=1834
> 2011-05-20T08:31:28+00:00 app[web.1]: cache: [GET /] miss
> 2011-05-20T08:31:28+00:00 app[web.1]: Connected to NewRelic Service at
> collector-1.newrelic.com:80
> 2011-05-20T08:31:29+00:00 app[web.1]: !! Unexpected error while
> processing request: deadlock; recursive locking
> 2011-05-20T08:31:29+00:00 heroku[router]: Error H13 (Connection closed
> without response) -> GET mysite.heroku.com/assets/application-
> b1637fec79c8bbd5d3a18e84f3da878f.css dyno=web.1 queue=0 wait=0ms
> service=0ms bytes=0
> 2011-05-20T01:31:29-07:00 heroku[nginx]: GET / HTTP/1.1 |
> 72.229.127.215 | 1480 | http | 200
>
> both edge and beta1 have the same results:
>
> Gemfile:
>
> source 'http://rubygems.org'
>
> #gem 'rails', '3.1.0.beta1'
> gem 'rails', git: 'git://github.com/rails/rails.git'
>
> gem 'pg'
> gem 'therubyracer-heroku', '0.8.1.pre3'
>
> # Asset template engines
> gem 'sass'
> gem 'coffee-script'
> gem 'uglifier'
>
> gem 'jquery-rails'
>
> Previous post:
>
> Rails 3.1 asset pipeline causing 503?
>
>     Klaus Hartl  May 11 06:06AM -0700 ^
>
>     Hello there,
>
>     I was curious and tried if I can use the new assets pipeline that
>     comes with Rails 3.1 beta (sprockets). From time to time I am
> getting
>     a 503 for requests of those merged application.js/.css files, an
>     example from my log:
>
>     2011-05-11T12:26:10+00:00 app[web.1]: cache: [GET /assets/
>     application-140d82c5f1fa592792bc01518bd2906e.js] fresh
>     2011-05-11T12:26:10+00:00 heroku[router]: GET tweektv.heroku.com/
>     assets/application-140d82c5f1fa592792bc01518bd2906e.js dyno=web.1
>     queue=0 wait=0ms service=2ms bytes=8700
>     2011-05-11T05:26:10-07:00 heroku[nginx]: GET /assets/
>     application-140d82c5f1fa592792bc01518bd2906e.js HTTP/1.1 |
>     84.191.168.124 | 1325 | http | 503
>
>     I am fully aware that this is beta and I did not necessarily
> expect it
>     to work just so. I'm wondering if this is something related to the
> app
>     or if this is on Heroku's side anyway (in other words, should I
> just
>     wait for Rails 3.1 out of beta or not)... The log message isn't
> very
>     helpful to me, as is what I get in the response of such 503
> request
>     (stripped html):
>
>     "Application Error
>     An error occurred in the application and your page could not be
>     served. Please try again in a few moments.
>     If you are the application owner, check your logs for details."
>
>     Last not least I have installed the Exceptional Premium add-on and
> I'm
>     not getting any error notifications in there.
>
>     Any insight is very much appreciated...
>
>     --Klaus

-- 
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 unsubscri

Re: heroku[router]: Error H12 (Request timeout) causing Application Error

2011-05-18 Thread chris
Usually that error means that, y'know, your app is timing out. As in, 
something is taking a real long time to run... in your code... not in 
heroku's. And for whatever reason that is being fixed with a restart.

-- 
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: Cron addon has been failing to run

2011-05-16 Thread chris
Yep, looks like cron has fallen behind for us as well... Heroku, hellp 
u.

-- 
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: Fragment Caching "kind of" expiring

2011-05-06 Thread chris
Fragment caching writes to the filesystem, doesn't it? And that's a big 
no-no in the heroku env. You're going to have to use memcached instead. But 
I would really recommend trying to use varnish and loading the select box 
options in via JS on page load.

-- 
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: Download CSV from AWS as file, not text

2011-05-05 Thread chris
Oh boy, not sure what you're doing there... or used to be doing... but to 
send data, you use... send_data. 
http://apidock.com/rails/ActionController/Streaming/send_data

But, if you're downloading from S3... you could just, y'know, redirect the 
user to your s3 bucket/path?

-- 
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: what external executables are available in the heroku stack?

2011-05-04 Thread Chris Hanks
It would also be good if our apps had access to a node.js executable,
since execjs would be able to use it to compile coffeescripts in Rails
3.1 when it's released.


On May 4, 9:23 am, fearless_fool  wrote:
> I've dug around for a bit and haven't found a list of all the
> executables that are available from within a Heroku-hosted Rails app.
> But the list must exist -- can someone point me to it?
>
> TIA.
>
> -- ff
>
> (I actually want to know if it's possible for my Heroku hosted app to
> call gnuplot -- I'm guessing no, but it would be nice to know what
> resources are available before I write more Ruby code.)

-- 
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: does varnish care about query strings?

2011-04-28 Thread chris
FYI, CDN's generally ignore query strings (even with origin-pull), so he's 
not totally off base. But yeah, Varnish sure doesn't.

-- 
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: Suggestion for Heroku - different error message when issue deriving from AWS

2011-04-21 Thread chris
We created a custom error page and are seeing the heroku generic instead of 
our prettiness. Sad...

-- 
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: Odd problem with distance_of_time_in_words

2011-04-06 Thread chris
Are you utilizing the Varnish cache that Heroku provides?

-- 
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: Cron: Run a cron job only on Monday

2011-03-31 Thread Chris Hanks
Oh, you must be on Ruby 1.8.7, then? You'll have Time#thursday? (and
the other days of the week) on 1.9, or if you're using Rails.

Sorry for the confusion. Jeff's suggestion is best, but when you
upgrade to 1.9 I'd suggest using Time#thursday?, since it's so much
more readable.



On Mar 31, 10:14 am, Doug Naegele  wrote:
> Thanks Chris.
>
> Sorry, it didn't work.
>
> Here's my code:
>
>   if Time.now.thursday?
>     puts "Send report"
>     uri = URI.parse('http://myapp.heroku.com/messages/send_report')
>     Net::HTTP.get(uri)
>     puts " Report put is done."
>   end
>
> Here's the error output (after I ran heroku rake cron --trace)
>
> ** Invoke cron (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Execute cron
> rake aborted!
> undefined method `thursday?' for Thu Mar 31 10:06:51 -0700 2011:Time
> /app/lib/tasks/cron.rake:28
>
> (if Time.now.thursday? is line 28)
>
> -
>
> the following also throws an error:
>
> if Time.now == thursday
> .
> .
> .
> .
>
> (output below)
> rake aborted!
> undefined local variable or method `thursday' for main:Object
>
> 
>
> this also throws an error:
>
> if Time.now.day == thursday
> .
> .
> .
> .
> (output below)
> rake aborted!
> undefined local variable or method `thursday' for main:Object
>
> On Mar 31, 12:32 pm, Chris Hanks 
> wrote:
>
>
>
>
>
>
>
> > Try: Time.now.monday?
>
> > On Mar 31, 8:16 am, Doug Naegele  wrote:
>
> > > Can someone help me configure Heroku Cron to only run on a certain
> > > day?
>
> > > So, imagine I send an email report every Monday morning.  How do I
> > > write the syntax for that?
>
> > > Something like this:
>
> > > This one works:
>
> > >   if Time.now.hour == 7  ##Sends report @7am, PST.
> > >     puts "Send report"
> > >     uri = URI.parse('http://myapp.heroku.com/messages/send_report')
> > >     Net::HTTP.get(uri)
> > >     puts " Report is done."
> > >   end
>
> > > This one does not work:
>
> > >   if Time.now == Monday  ##Sends report at the daily Heroku cron run,
> > > but only on Monday.
> > >     puts "Send report"
> > >     uri = URI.parse('http://myapp.heroku.com/messages/send_report')
> > >     Net::HTTP.get(uri)
> > >     puts " Report is done."
> > >   end
>
> > > thanks in advance

-- 
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: Cron: Run a cron job only on Monday

2011-03-31 Thread Chris Hanks
Try: Time.now.monday?



On Mar 31, 8:16 am, Doug Naegele  wrote:
> Can someone help me configure Heroku Cron to only run on a certain
> day?
>
> So, imagine I send an email report every Monday morning.  How do I
> write the syntax for that?
>
> Something like this:
>
> This one works:
>
>   if Time.now.hour == 7  ##Sends report @7am, PST.
>     puts "Send report"
>     uri = URI.parse('http://myapp.heroku.com/messages/send_report')
>     Net::HTTP.get(uri)
>     puts " Report is done."
>   end
>
> This one does not work:
>
>   if Time.now == Monday  ##Sends report at the daily Heroku cron run,
> but only on Monday.
>     puts "Send report"
>     uri = URI.parse('http://myapp.heroku.com/messages/send_report')
>     Net::HTTP.get(uri)
>     puts " Report is done."
>   end
>
> thanks in advance

-- 
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: request.remote_ip

2011-03-30 Thread chris
Again, if you're using Hostname Based SSL, even on non-https requests, you 
will not get the users IP, no matter which headers you try. So, yeah, you'll 
have go to through a 3rd party, or try not to care about the IPs at all!

-- 
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: request.remote_ip

2011-03-15 Thread chris
... r just upgrade to ip-based SSL, it's way more expensive though.

-- 
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: request.remote_ip

2011-03-15 Thread chris
Are you using Hostname Based SSL? Due to... who knows what... Hostname Based 
SSL will not allow you to get a users IP address. Instead, it will return 
the same few every time. Looking at different headers, etc. won't help.

Sucks, I know. If you really need a users IP address, you can use an 
external service (or build one yourself if you're feeling fancy) ... such as 

jsonip.com. (jsonip.com/callbackmethodname for JSONP callbacks)

-- 
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: Sinatra and Heroku

2011-03-09 Thread Chris Johnson
I also tested 1.8.7 on my local machine and works great. Gemfile and 
Gemfile.lock file both look good but still getting that CouchRest error 
when I do a push. If it helps any, here is hte log after a push:


2011-03-09T11:46:57-08:00 heroku[web.1]: State changed from crashed to 
created
2011-03-09T11:46:57-08:00 heroku[web.1]: State changed from created to 
starting
2011-03-09T11:47:01-08:00 app[web.1]: 
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require': no such file to load -- CouchRest (LoadError)
2011-03-09T11:47:01-08:00 app[web.1]: from 
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`require'

2011-03-09T11:47:01-08:00 app[web.1]: from ./reservations.rb:4
2011-03-09T11:47:01-08:00 app[web.1]: from 
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`require'

2011-03-09T11:47:01-08:00 app[web.1]: from config.ru:1
2011-03-09T11:47:01-08:00 app[web.1]: from 
/home/heroku_rack/heroku.ru:23
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`instance_eval'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`initialize'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in 
`new'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in 
`map'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/home/heroku_rack/heroku.ru:18
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`instance_eval'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`initialize'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/home/heroku_rack/heroku.ru:11:in `new'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/home/heroku_rack/heroku.ru:11
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`instance_eval'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/app/f2990cce-2de5-4957-b7e2-ec0aa808462c/home/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in 
`initialize'
2011-03-09T11:47:01-08:00 app[web.1]: from 
/home/heroku_rack/heroku.ru:1:in `new'

2011-03-09T11:47:01-08:00 app[web.1]: from /home/heroku_rack/heroku.ru:1
2011-03-09T11:47:02-08:00 heroku[web.1]: State changed from starting to 
crashed






kowsik <mailto:kow...@gmail.com>
March 9, 2011 11:02 AM



Do you have gem 'couchrest', '1.0.1' in your Gemfile?

K.
---
http://blitz.io
http://twitter.com/pcapr


masterof0 <mailto:master...@gmail.com>
March 9, 2011 10:41 AM


I am new to Heroku (and Ruby for that matter) and in the process of
setting up my first app which is Sinatra based with a Cloudant back
end. It works locally just fine. I followed the documentation and
created config.ru and .gems. The push was successful, but when I view
the page, I get an application error. Reviewed the logs and noticed
the following:

2011-03-09T10:25:20-08:00 heroku[web.1]: State changed from starting
to crashed

Couple of additional things I noticed while reviewing the logs. I am
running ruby 1.9.2, but the references in the log refer to 1.8.2. I am
assuming this is the version of ruby that Heroku is running so I will
need to downgrade my version to match. Also, I just noticed that the
couchrest gem gives me an error but there isn't any real indication as
to why.

2011-03-09T10:25:19-08:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/
site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require':
no such file to load -- CouchRest (LoadError)

Any feedback is greatly appreciated.

Chris



--
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: Exceptional + workers

2011-03-08 Thread chris
You'll have to monkeypatch Delayed::Job. Here's what we do: 
https://gist.github.com/860883

We use ExceptionNotifier, but the same basics apply, probably just need to 
swap out that ExceptionNotifier line.

-- 
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: Don't know how to build task 'db:migrate'

2011-02-22 Thread chris
Does running 'rake -T' locally list db:migrate as one of the rake tasks? If 
not, your rails is misconfigured. If so, it sounds to me like you forgot to 
commit a file or two. 'heroku rake -T' should list db:migrate, amongst 
others. You shouldn't have to do anything special for rails 3. I would run 
'git status' and see which files are uncommitted. 

-- 
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: Action Caching... force it to use Varnish not Memcache

2011-02-20 Thread Chris Hanks
Yeah, that's wrong. Oren said he'd fix it last year - not sure why it
still says that.

http://groups.google.com/group/heroku/browse_thread/thread/29fcfe4ba3fa0451


On Feb 20, 1:16 am, railsnerd  wrote:
> Thanks for the reply Chris
>
> Can I just confirm that Varnish persists regardless of user page
> refreshing.
>
> The documentation says: "Pressing shift-reload in the browser will
> cue
> the browser and Varnish to regenerate the page, regardless of the
> cache state."http://devcenter.heroku.com/articles/http-caching
>
> That goes against expectation... hope it's an error :)

-- 
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: Action Caching... force it to use Varnish not Memcache

2011-02-19 Thread Chris Hanks
Ok, I think I understand what you're getting at. Yeah, you can tell
Varnish to cache a specific rendered page, but that wouldn't be action
caching, hence the confusion.

Anyway, Varnish will cache anything that has a Cache-Control header.
So for example, to cache a specific page in Varnish for 5 minutes, you
would do:

response.headers['Cache-Control'] = 'public, max-age=300' if
your_condition

You could also tell rails to not action cache at all in that case:

caches_action :index, :unless => :your_condition




On Feb 19, 8:38 pm, railsnerd  wrote:
> Yes I understand that and am OK with the consequences
>
> I just want to force Action Cache to force a Page Cache on certain
> occasions

-- 
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: Action Caching... force it to use Varnish not Memcache

2011-02-19 Thread Chris Hanks
Not sure what you mean by this. Varnish is an HTTP cache, it sits in
front of your dyno and only caches the responses that it sends - you
can't use it as a key-value store like memcached. When a request is
handled by varnish and doesn't even hit your app, that IS page
caching.

If you could write a bit more about what you're trying to do, we can
offer more guidance.


On Feb 19, 7:45 pm, railsnerd  wrote:
> Hi everyone
>
> Is there a way to force Action Caching to cache to Varnish and not use
> Memcache?
>
> Yes I fully realise this might cause (?) the next request to hit
> Varnish and not my app, which defeats the purpose of Action Caching
> and I should use Page Caching... but I have my reasons :)
>
> If there was a hack or a tweak, or any ideas, I'd be super happy!
>
> 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: Change to Heroku rake db:migrate output freaked me out

2011-02-09 Thread chris
When I run "rake db:migrate" locally, I get all of the migrations listed 
out:

chris@goldfish$ rake db:migrate
(in /Users/cmcclelland/workspace/XXX)
  SQL (30.0ms)  SHOW client_min_messages
  SQL (0.2ms)  SET client_min_messages TO 'panic'
  SQL (0.3ms)  SET standard_conforming_strings = on
  SQL (0.1ms)  SET client_min_messages TO 'notice'
  SQL (94.2ms)  SET time zone 'UTC'
  SQL (0.1ms)  SHOW TIME ZONE
  SQL (45.1ms)  SELECT "schema_migrations"."version" FROM 
"schema_migrations"
Migrating to CreateInitialTables (20100329164816)
Migrating to AddManchesterAndWorcester (20100329180447)
Migrating to MaxmindGeolocation (20100330200706)
Migrating to CreateTransactions (20100401145908)
Migrating to AddRoleMaskToUsers (20100407204815)
Migrating to CreateCreditCards (20100413144222)
Migrating to CreateDelayedJobs (20100414192906)
Migrating to AddRedemptionInstructionsToDeals (20100416155743)
Migrating to AddDefaultToCreditCards (20100416172408)
...

So, I am seeing the same behavior as on heroku.

-- 
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: Varnish VCL configuration

2011-02-08 Thread chris
Simply put: no.

-- 
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.



Price reduction in custom SSL?

2011-01-27 Thread Chris Hanks
I know that the custom SSL plan costs $100 because it requires a
dedicated EC2 instance, and the small instances cost about $60 a
month. But since EC2 has now introduced micro instances, for a little
under $15 a month, will we be seeing a price reduction for the custom
SSL plan?

Chris

-- 
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: Question on shutting down Workers

2011-01-25 Thread Chris Hanks
Alright, that makes sense. Thanks, Adam.



On Jan 25, 11:12 am, Adam Wiggins  wrote:
> I understand what you're trying to do, but this won't work.  Heroku
> will try to keep your workers alive no matter what; when it exits it
> will change state to "crashed" and try to restart once, then again
> every ten minutes.  The full crash policy is described here:
>
> http://docs.heroku.com/ps#crashed-process-restarts
>
> If you want to change the number of running workers, you need to use
> the Heroku API.
>
> 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.



Question on shutting down Workers

2011-01-25 Thread Chris Hanks
Hi -

I'm rigging up my own auto-scaling solution for workers. My plan to
shut a worker down when it's not needed is to set $exit = true when
there are no jobs left for it to do. As you can see (https://
github.com/collectiveidea/delayed_job/blob/v2.1.3/lib/delayed/
worker.rb#L74-92) this will simply end the "rake jobs:work" task just
as if I had (for example) hit Ctrl+C.

My question is, will Heroku recognize that the worker process has
ended and stop charging my account when this happens? Or do I have to
actually hit the Heroku API to shut it down? I'd prefer to use $exit
if possible, since that will ensure that the current worker (the one
with no jobs available) shuts down, whereas if I tell the Heroku API
to decrement my worker count by 1, and I have multiple workers
running, it could kill one of the other ones mid-job.

Thanks!
Chris

-- 
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.



Issues with diacritics

2011-01-23 Thread Chris F.
Hello,

I have an application running on Heroku bamboo-ree-1.8.7 that uses a
Solr index. Whenever searches with any diacritics are submitted, the
Solr instance receives an incorrect character.
For example, a search of  "Drácula" in submitted to Solr as
"q=Drácula".

The application works correctly on both my laptop and a development
RHEL server, all running Ruby REE 1.8.7 and Rails 2.3.10 and RSolr
1.0.0 .

Any suggestions on how to correct this?

Thanks, chris.

-- 
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: My (flawed?) attempt to add or subtract workers via Heroku API.

2011-01-21 Thread Chris Hanks
You can start up as many workers (or dynos, for that matter) as you
want through the command line. 24 is just how high the slider goes on
the pricing page.



On Jan 21, 7:52 am, rubynoob  wrote:
> I may misunderstand how workers get charged on heroku, but from what
> I've seen 
> athttp://docs.heroku.com/background-jobsandhttp://docs.heroku.com/delayed-job,
>  workers get charged $0.05/hr each
> no matter how many are running, pro-rated to the second.  The maximum
> workers per account seems to be 24 (that's where the slider stops on
> their Resources page).
>
> The jobs being delayed won't be created faster than one every 30
> seconds, so I assumed the first worker would spin up and grab the
> first job, then when the second job gets queued, a second worker would
> start, grabbing the second job, and so on.  Each job would process in
> it's own worker, which would then get shut down when the job
> completes.  One worker running three jobs that take a total of fifteen
> minutes to process should get charged the same as three workers
> running one job each for five minutes.  If I'm mistaken, let me know.
>
> Thanks,
> Jim
>
> On Jan 20, 4:57 pm, Keenan Brock  wrote:
>
>
>
>
>
>
>
> > Also a thought.
>
> > You will need to introduce a lag when you are determining if you need more 
> > or less delayed job workers.
>
> > Otherwise you will spin up too many DJs too quickly. And add/remove them 
> > very often. Incurring extra charges.
>
> > Smugmug spoke about this when they were talking about their on demand photo 
> > processors a few years back.
>
> > --Keenan
>
> > On Jan 20, 2011, at 6:06 PM, Pedro Belo  wrote:> That was 
> > a good call, you definitely don't want to store variables in
> > > config vars. Save if for constants (passwords, urls, etc).
>
> > > It seems like you might be getting an error due to different versions
> > > of RestClient, not sure though. What version are you using? What's the
> > > stack trace for the exception?
>
> > > On a side note, if it helps you can call heroku workers passing
> > > relative values, like +3, -1, etc.
>
> > > On Thu, Jan 20, 2011 at 12:00 PM, rubynoob  
> > > wrote:
> > >> Instead of storing the count of active workers as a heroku config
> > >> variable, I decided to create a table in our database to store the
> > >> value in.
> > >> So now I've got the problem narrowed down to the last line in the
> > >> method.  Here's the block of code I've now got:
>
> > >> add_heroku_worker
> > >>                heroku = Heroku::Client.new(ENV['HEROKU_USERNAME'],
> > >> ENV['HEROKU_PASSWORD'])
> > >>                myapp = 
> > >> heroku.config_vars(ENV['HEROKU_APP'])["HEROKU_APP"]
> > >>                worker_count = WorkerCount.find(1)  # now I'm storing the 
> > >> current
> > >> number of active workers in a table that will always only have one
> > >> record.
> > >>                workers = worker_count.workers
> > >>                qty = workers + 1
> > >>                worker_count.workers = qty
> > >>                worker_count.save
> > >>                heroku.set_workers(myapp, qty)
> > >> end
>
> > >> In the heroku console, this runs smoothly until I try the last line,
> > >> to which I get this error:  TypeError: can't convert
> > >> RestClient::Payload::UrlEncoded into String
>
> > >> This line is formatted the same as LostBoy's workless gem, the
> > >> autoscaling tree of delayed_job, and Heroku-Delayed-Job-Autoscale.  I
> > >> must be missing something obvious (typical newbie, huh?)   ;)
>
> > >> Thanks again for any help,
> > >> Jim
>
> > >> On Jan 20, 9:16 am, Peter Haza  wrote:
> > >>> I've done autoscaling of workers
> > >>> here:https://github.com/phaza/Heroku-Delayed-Job-Autoscale
> > >>> It's actually more like auto-shutdown of a single workers, but it works 
> > >>> well
> > >>> in our environment.
>
> > >> --
> > >> 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 
> > >> 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 heroku@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 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: postgres tuning

2011-01-11 Thread chris
Your use case (high volume, low value writes) sounds like it would be a 
perfect match for one of heroku's nosql addons... mongo or couch in 
particular. 

-- 
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: Smaller fonts in production?

2011-01-06 Thread Chris Walsh
Hi Carson,

I submitted this *exact* same question about a month ago after banging
my head against a brick wall for a few hours.

Press Cmd+0 (Mac) or Ctrl+0 (Win) to reset the zoom on your browser.

I have to admit, I was a little embarrassed at the time.  But now I'm
glad I'm not the only one (presuming this works for you!)
Chris

On Jan 5, 12:01 am, Carson Cole  wrote:
> My fonts appear 25% smaller in production on Heroku vs in development
> locally. Have only one style sheet 'main.css' that I load '<%=
> stylesheet_link_tag 'main' %>' that shows correctly in source code in
> production. What gives?
>
> Here's my stylesheet:
>
> /* DEFAULTS */
> *  {
>     margin: 0;
>     padding: 0;
>     border: 0;
>
> }
>
> body {
>         background-color: #fff;
>         height: 100%;
>         width: 100%;
>         font: 13px "Lucida Sans", Tahoma, Verdana, sans-serif;}
>
> a {
>         margin-left: 7px;
>         margin-top: 4px;
>         float: left;}
>
> h1 { font-size: 2.5em; }
> h2 { font-size: 1.8em;}
> h3 { font-size: 1.6em; }
> h4 {  font-size: 1.5em;  }
> h5 { font-size: 1.4em;}
> p {  font-size: 1.2em; }
> .clear { clear:both; }
> .right { float: right; }
> .left { float: left; }
> .email {
>         margin-top: 5px;}
>
> .header { width: 100%;}
> .facebook_icon { margin-top: -1px;}
> .follow {
>         background-color: #5f9e52;
>         text-align: center;
>         width: 100%;
>         margin: 0 auto 0 auto;}
>
> .follow .frame {width: 350px;}
> .follow_text {
>         font-size: 1.8em;
>         color: #fff;
>         float: left;
>         margin-top: 3px;
>         margin-left:8px;
>         margin-right: 20px;}
>
> form {float: left;}
> form input {
>         border: thin #fff solid;
>         padding: .2em;
>         font-size: .8em;}
>
> #footer {
>         clear: both;
>         text-align: center;
>         margin-top: 1em;
>         margin-bottom: 1em;
>         font-size: .8em;
>         color: #5f9ef2;}
>
> .frame {
>         width: 650px;
>         margin: 0 auto;}
>
> .marketing {
>         font-size: 13px;
>         background-color: #D0EBCA;}
>
> .marketing .frame {
> padding-top: 1em;
> padding-bottom: 1em;}
>
> .marketing h1 {
>         margin-top: 0.5em;
>         margin-bottom: .5em;
>         font-weight: 500;
>         color: #18649b;}
>
> .marketing h2 {
>         font-weight: 500;
>         margin-top: 1em;
>         margin-bottom: .4em;
>         color: #18649b;}
>
> .marketing p {
>         font-size: 1.1em;
>         line-height: 1.5em;}
>
> .logo {
>         margin: 1em 0;
>         width: 12em;}
>
> .notice {
>         float: right;
>         text-align: center;
>         margin-top: 1em;
>         width: 300px;
>         color: #fff;}
>
> .notice .regular {
>         padding: 10px;
>         background-color: #18649b;}
> .notice .error {
>         padding: 10px 20px;
>         background-color: #f02311;}
> p.special_message {
>         width: 300px;
>         background-color: #18649b;
>         text-align: center;
>         color: #fff;
>         padding: 10px;
>         margin: 1.2em auto 1.3em auto;}

-- 
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: Cron, delayed jobs and workers scaling

2011-01-05 Thread chris
Cron and delayed_job are entirely separate things.

You use cron if you want to run things daily (or hourly). Say you want to 
send a daily report to all your users, you would use the code your posted 
above.

You use delayed_job if you want to run something in the background (email 
sending, heavy processing, etc) after something happens. Say, someone buys 
something from your site and you want to send them a receipt. You would do 
this via delayed_job, doing something like 
UserMailer.send_later(:notification_mail, user)

Hope that helps!

-- 
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: Rails3 + AmazonRDS addon: "missing the mysql2 gem" error

2010-12-20 Thread Chris Conley
I came across this error as well. For the time being, I've reverted to
the 'mysql' gem.

-Chris

On Dec 15, 6:08 pm, vovayartsev  wrote:
> Hi all.
>
> There seem to be a bug in Amazon RDS addon (or I'm doing something
> wrong?).
> Here are the steps to reproduce:
>
> 1. Create an empty rails-3.0.3 app with a single scaffolded resource.
> 2. Add the "gem 'mysql2'" line to Gemfile; then execute `bundle
> install`. Make sure the command 'bundle show mysql2' can find the gem.
> 3. Push the app to Heroku (using the default bamboo-ree-1.8.7 stack).
> 4. Make sure the 'db:migrate" task and the application itself run as
> expected using the shared 5MB database.
> 5. Launch an Amazon RDS instance in us-east-1a zone, then follow 
> thehttp://docs.heroku.com/amazon_rdsguidelines:
> 5.1 rds-authorize-db-security-group-ingress ...    # ok
> 5.2 heroku db:pull mysql://user:p...@rdshostname.amazonaws.com/databasename
> # ok
> 5.3 heroku addons:add amazon_rds url=mysql://
> user:p...@rdshostname.amazonaws.com/databasename    # ok
> 5.4 heroku rake db:migrate      # this FAILS 
>
> The last step fails with the following error:
>        !!! Missing the mysql2 gem. Add it to your Gemfile: gem
> 'mysql2'
>
> Note: I used the same url in 5.2 and 5.3 steps (I copy-pasted it to
> avoid spelling errors).
>
> HERE'S WHAT I'd LIKE TO KNOW
>
> 1. Is this a know issue? Does anyone knows a workaround?
> 2. If anyone was able to reproduce the issue?
> 3. Are there Heroku techs reading this group? Or should I better post
> a ticket tohttp://support.heroku.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: memcached servers

2010-12-20 Thread chris
FYI, dalli will detect that ENV variable automatically -- you shouldn't need 
to specify the server(s) at all. Here's our dalli configuration (rails3 app, 
yours may vary):

  config.cache_store = :dalli_store, { :namespace => 'll', :expires_in 
=> 30.minutes, :compress => true, :compress_threshold => 64*1024 }

-- 
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: Error when using memcached uninitialized constant Memcached (NameError)

2010-12-15 Thread chris
Remove the "gem 'memcached'" line from your gemfile and you should be good 
to go. You only need the dalli gem.

-- 
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: Running a daemon process on Heroku

2010-12-07 Thread Chris Hanks
Well, since you pay for workers by the hour, I'm sure Heroku would be
perfectly happy with you keeping many of them busy for a very long
time.



On Dec 7, 10:44 pm, Jonas  wrote:
> Nice. So that was actually what I initially thought.
> And there is no limitation on what that worker does? I mean, it's okay
> to preoccupy that worker till eternity? :)
>
> On 7 Dec., 20:53, David Dollar  wrote:
>
>
>
>
>
>
>
> > A Heroku worker is simply running "rake jobs:work" on your app so whatever 
> > happens behind that rake task is up to your app.
>
> > On Dec 7, 2010, at 10:47 AM, Jonas  wrote:
>
> > > Hi guys,
>
> > > Hi guys,
>
> > > Ok, so I've succesfully developed a daemon that fires up EventMachine,
> > > subscribe to a data feed and communicate that data to Pusherapp.com
>
> > > Everything is working beautifully in production on my OSX development
> > > machine, and now I want to deploy to Heroku. My initial understanding
> > > was that the Heroku workers would suite this purpose well, however
> > > I've come to realize that I might be wrong.
>
> > > My question is, how do I run a daemon in the Heroku environment?
>
> > > Some facts:
>
> > > Ruby 1.9.2
> > > bamboo-mri-1.9.2 (beta)
> > > Rails3
> > > Daemons gem:https://rubygems.org/gems/daemons
> > > The deamon_generator plugin:https://github.com/dougal/daemon_generator
> > > An old Railscast that describes approx. how a daemon like this is set
> > > up:http://railscasts.com/episodes/129-custom-daemon
>
> > > How the daemon works:
> > > I've setup a rake task to start the daemon, briefly, this is the
> > > process:
> > > 1. Rake task calls "lib/daemons/my_daemon_ctl start"
> > > 2. Require some gems and start daemon: Daemons.run
> > > File.dirname(__FILE__) + "/my_daemon.rb", options
> > > 3. Loads rails env and starts the EventMachine reactor:
> > > EventMachine::run { data feed and pusherapp black magic here }
>
> > > --
> > > 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: Cannot push app to heroku

2010-12-05 Thread Chris Kramp
Wow, can't believe I missed the spelling error. Thanks - everything is
working now.

-- Chris

On Dec 1, 12:48 pm, Neil Middleton  wrote:
> Feezing-cloud-50??
> On 1 Dec 2010 19:46, "Chris Kramp"  wrote:
>
>
>
> > Hi All,
>
> > I am following railstutorial.org and am attempting to push my first
> > app (named first_app) to heroku. I get the following output:
>
> > first_app > heroku list
> > You have no apps.
>
> > first_app > heroku create
> > Creating freezing-cloud-50 done
> > Createdhttp://freezing-cloud-50.heroku.com/| g...@heroku.com:freezing-
> > cloud-50.git
>
> > first_app > git push heroku master
>
> > ! No such app as first_app
>
> > fatal: The remote end hung up unexpectedly
>
> > I believe my git remote is setup correctly:
> > first_app > git remote -v
> > heroku g...@heroku.com:feezing-cloud-50.git (fetch)
> > heroku g...@heroku.com:feezing-cloud-50.git (push)
>
> > Any ideas?
>
> > Thanks,
> > Chris Kramp
>
> > --
> > 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.



Cannot push app to heroku

2010-12-01 Thread Chris Kramp
Hi All,

I am following railstutorial.org and am attempting to push my first
app (named first_app) to heroku. I get the following output:

first_app > heroku list
You have no apps.

first_app > heroku create
Creating freezing-cloud-50 done
Created http://freezing-cloud-50.heroku.com/ | g...@heroku.com:freezing-
cloud-50.git

first_app > git push heroku master

 !  No such app as first_app

fatal: The remote end hung up unexpectedly

I believe my git remote is setup correctly:
first_app > git remote -v
heroku  g...@heroku.com:feezing-cloud-50.git (fetch)
heroku  g...@heroku.com:feezing-cloud-50.git (push)

Any ideas?

Thanks,
Chris Kramp

-- 
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 to determine if my app is being run on a dyno or a worker?

2010-12-01 Thread Chris Hanks
I have a few delayed_jobs that require data to be loaded from the
database and kept in memory. I've set up an initializer to load that
data (this is a Rails 3 app), but I'm not sure how to only run it on a
worker process and not my dynos. I noticed, while tooling around in
`heroku console`, that ENV["HEROKU_TYPE"] == "Dyno" - I was hoping
that in a worker process it would be "Worker", but that doesn't seem
to be working, and I don't know how to inspect the ENV hash from a
worker instance.

Any pointers? 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.



Different size fonts and images between localhost and heroku

2010-11-30 Thread Chris Walsh
Hi folks,

I'm not sure if this is specific to Heroku or not, but it's still
driving me nuts.

My site looks different when viewed running on localhost compared to
when it's deployed to heroku, even when viewed in the same browser.

By different, I mean my fonts and images are a lot smaller in
production (maybe 25% smaller) compared to localhost.   It's throwing
all my styling out and makes it a pain to layout the page properly.

Anybody seen this before?
Chris

-- 
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 rake db:migrate fails with "no such file to load -- sqlite3" on bamboo-mri-1.9.2

2010-11-27 Thread Chris Hanks
If you had the sqlite gem in your Gemfile, Heroku should have
installed it for you. Not sure why it didn't.

Regardless, though, Heroku provides each app with a Postgres database,
which is more fully-featured than sqlite, so it would be a good idea
to get used to using it instead. It's a good rule to keep your
development and production environments the same, so you'll probably
want to install Postgres locally as well.

All that said, it's totally fine if you want to wait a while to jump
ahead to Postgres. Rails ships with sqlite because it's simple and
easy to get started with (even though Heroku doesn't really support
it). If you're just getting your feet wet with Rails you might want to
wait before adding any more complexity - if you want to get this app
in production quickly so that other people can play with it, though,
you should probably jump ahead to Postgres.



On Nov 27, 12:43 pm, Roy Pardee  wrote:
> On Nov 27, 10:06 am, Roy Pardee  wrote:
>
>
>
>
>
>
>
>
>
> > Hey All,
>
> > I'm trying to put up a very simple rails3 app, and seem to be stuck at
> > the rake db:migrate step with a "no such file to load -- sqlite3".
> > That's an error I'm used to saying when setting up a new windows
> > computer for rails work--got to put the sqlite3.dll on the path for it
> > to work.  But it seems odd that heroku wouldn't have the proper sqlite
> > stuff available.  Can anyone advise?
>
> > Many thanks!
>
> > -Roy
>
> > Here's the barf in question:
>
> >   $ heroku rake db:migrate
> >   rake aborted!
> >   no such file to load -- sqlite3
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:64:in `require'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:64:in `block (2 levels) in require'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:62:in `each'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:62:in `block in require'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:51:in `each'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler/
> > runtime.rb:51:in `require'
> >   /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.3/lib/bundler.rb:
> > 112:in `require'
> >   /disk1/home/slugs/361339_413858d_dbb1-98c85f12-e88f-48d0-
> > b7e6-3a16c5098bf4/mnt/config/application.rb:7:in `'
> >   :29:in `require'
> >   :29:in `require'
> >   /disk1/home/slugs/361339_413858d_dbb1-98c85f12-e88f-48d0-
> > b7e6-3a16c5098bf4/mnt/Rakefile:4: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 `'
> >   (in /disk1/home/slugs/361339_413858d_dbb1-98c85f12-e88f-48d0-
> > b7e6-3a16c5098bf4/mnt)
>
> >   r...@zoidberg /c/railsapps/pardee_santa (master)
>
> After posting I continued flailing about and eventually got it to work
> after migrating it to bamboo-ree-1.8.7 by commenting-out the line
>
>   gem 'sqlite3-ruby', :require => 'sqlite3'
>
> in my Gemfile.  This breaks the app for local use, but seems to fix it
> for heroku.
>
> No clue whether that fix would have also fixed it on bamboo-mri-1.9.2.
>
> Cheers,
>
> -Roy

-- 
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: hostname: Unknown host

2010-11-22 Thread chris
I agree their support is slow (make it better!
http://jobs.heroku.com/ruby_cloud_platform_support_engineer ) but we
run large (2+ million hits/month) sites on heroku with no stability
problems at all.

They do offer (expensive, I'm guessing) priority support packages.

On Nov 16, 10:01 pm, Thawatchai Piyawat  wrote:
> My app is crashed since yesterday. The log show "hostname: Unknown
> host". I believe this is Heroku's problem. However, it's more than a
> day, it's still not fixed now. It seems odd.
>
> I've submitted a support request. However, according to my experience,
> Heroku support is slow.
>
> Heroku seems like a good service. However, their stability and support
> staff need quality improvement. Anybody has the same problem as mine?
>
> Thawatchai

-- 
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: Can I use my own SendGrid credentials?

2010-11-22 Thread chris
If you have your own sendgrid account, there's no point in even using
heroku's addon.

Just throw something like this in your environment.rb:

  config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address=> 'smtp.sendgrid.net',
:port   => '587',
:authentication => :plain,
:user_name  => SENDGRID_USER,
:password   => SENDGRID_PW,
:domain => 'yourdomain.com'
  }


On Nov 20, 10:25 pm, Barry Hoggard  wrote:
> Can I use my existing SendGrid account on Heroku? Would setting the
> environment variables in config/environment.rb override Heroku's
> version?

-- 
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: compass causing file writing error?

2010-11-16 Thread Chris Hanks
In my compass initializer file I include:

Sass::Plugin.options[:never_update] = true if Rails.env.production?




On Nov 16, 9:57 pm, Josh Coffman  wrote:
> I'm using compass in one of my rails apps on heroku, and every time I push
> it, it fails to load on the first request and shows an error page. It works
> fine on subsequent requests. I think compass is trying to write to
> public/stylesheets/ie.css. here is the error from the heroku logs:
>
> Started GET "/" for 72.208.78.46 at 2010-11-16 21:51:09 -0800
>
> Errno::EROFS (Read-only file system -
> /disk1/home/slugs/274925_210ef9f_8bf2-58f50fc2-dbf0-4734-8c90-e918608ebf20/ 
> mnt/public/stylesheets/ie.css
> - Heroku has a read-only filesystem.  
> Seehttp://docs.heroku.com/constraints#read-only-filesystem):
>
> Anyone know how to stop it from writing? I tried using the line in
> production.rb to turn off Sass, but that just gives be an error about
> module/namespace not found.
>
> TIA,
> Josh

-- 
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: I added BUNDLE_WITHOUT="development test", but Heroku still installs everything

2010-11-08 Thread Chris Hanks
It works! Thanks, Oren.


On Nov 8, 12:05 pm, Oren Teich  wrote:
> Bundlr 1.0.3 changed the syntax for without.  We are deploying a
> hotfix tomorrow.  In the meantime, seperate the groups you don't want
> deployed with a : instead of a space.  e.g. heroku config:add
> BUNDLER_WITHUOUT=development:test
>
> Oren
>
> On Mon, Nov 8, 2010 at 12:03 PM, Chris Hanks
>
>
>
>
>
>
>
>  wrote:
> > Yes, this started happening for me on Friday (worked fine up until
> > then). and it looks like it's still going on. When I push I see "Using
> > --without development test", but it tries to install all the
> > development/test gems anyway (which it can't, for me, because Heroku
> > can't handle ruby-debug19).
>
> > I haven't had a burning need to deploy recently, so I've been waiting
> > for Heroku to sort it out, but it looks like they haven't, yet.
>
> > Anyway, it's definitely a bug, so why not open a support ticket about
> > it? And maybe let us know how it works out?
>
> > On Nov 6, 3:06 pm, Volkan Unsal  wrote:
> >> I wanted Heroku's bundler to ignore some gems I have installed. It
> >> doesn't manage to do that, and as a result I am getting lots of
> >> errors.
>
> > --
> > 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: I added BUNDLE_WITHOUT="development test", but Heroku still installs everything

2010-11-08 Thread Chris Hanks
Yes, this started happening for me on Friday (worked fine up until
then). and it looks like it's still going on. When I push I see "Using
--without development test", but it tries to install all the
development/test gems anyway (which it can't, for me, because Heroku
can't handle ruby-debug19).

I haven't had a burning need to deploy recently, so I've been waiting
for Heroku to sort it out, but it looks like they haven't, yet.

Anyway, it's definitely a bug, so why not open a support ticket about
it? And maybe let us know how it works out?



On Nov 6, 3:06 pm, Volkan Unsal  wrote:
> I wanted Heroku's bundler to ignore some gems I have installed. It
> doesn't manage to do that, and as a result I am getting lots of
> errors.

-- 
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: http basic auth

2010-11-04 Thread Chris Hanks
Don't see why Heroku would have a problem with it. I've been using
Rails' basic auth functionality on Heroku for months with zero issues.


On Nov 4, 6:39 pm, Jimmy Thrasher  wrote:
> Not sure what you mean.  If you implement it, it's supported.. it's just a
> webserver returning a 401 Unauthorized HTTP response.  The browser will take
> care of popping up the dialog.
>
> Apache's .htaccess and other non-code ways of accomplishing it aren't
> supported.
>
> Here's an example for Sinatra:http://stackoverflow.com/questions/3479737
>
> Rails has a built-in authenticate_with_http_basic and a couple other
> methods.
>
> Jimmy
>
> On Thu, Nov 4, 2010 at 9:09 PM, Brandon Casci wrote:
>
>
>
>
>
>
>
>
>
> > Anyone know if basic http auth supported on Heroku?
>
> > I don't get the login box so I'm assuming no, unless there is a special
> > convention I don't know about.
>
> > --
> > =
> > Brandon Casci
> > Loudcaster
> >http://loudcaster.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.
>
> --
> +1-919-627-7546

-- 
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: Pushing a Rails app without the rails gem.

2010-10-31 Thread Chris Hanks
For anyone curious about this, I eventually solved it by starting off
my Gemfile with:

source :rubygems

# Shut up, Heroku.
# gem 'rails'

gem 'railties', '3.0.0'
gem 'actionpack', '3.0.0'
gem 'activesupport', '3.0.0'

And so on...



On Oct 18, 11:54 am, Chris Hanks 
wrote:
> It's a Rails 3 app, so it has an automatically generated config.ru.
> Thanks for the suggestion, though.
>
> On Oct 18, 9:38 am, Jimmy Thrasher  wrote:
>
>
>
>
>
>
>
> > I'm not sure about this, but you could try setting up a config.ru file to
> > manually start up your Rails app.  My suspicion is that it's failing to find
> > config.ru, auto-detecting a Rails app, and not finding all the gems.
>
> > Just some thoughts.. maybe you've already done all that.  :)
>
> > Jimmy
>
> > On Mon, Oct 18, 2010 at 12:33 PM, Chris Hanks 
> > > wrote:
> > > There's a lot of parts of Rails that my app has no use for
> > > (activerecord, actionmailer, activeresource, and all their associated
> > > dependencies like arel, mail, and so on), and I'm trying to take
> > > advantage of the new modularity in Rails 3. In my Gemfile I've
> > > replaced the rails dependency with:
>
> > > gem 'railties', '3.0.0'
> > > gem 'actionpack', '3.0.0'
> > > gem 'activesupport', '3.0.0'
>
> > > And my app works totally fine this way, except that Heroku won't
> > > accept it, saying:
>
> > > -> Rails app detected
> > >  !     Heroku Bamboo does not include any Rails gems by default.
> > >  !     You'll need to declare it in either .gems or Gemfile.
> > >  !     Seehttp://docs.heroku.com/gemsfordetails on specifying gems.
> > >  !     Heroku push rejected, no Rails gem specified.
>
> > > Is there a workaround for this? Something I can change to not trigger
> > > the Rails app detection? I understand the need for the warning, but
> > > ideally, I think my invocation of 'railties' would signify to Heroku
> > > that I know what I'm doing.
>
> > > 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.
>
> > --
> > +1-919-627-7546

-- 
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 routing issues

2010-10-29 Thread Chris Hanks
My advice would be to drop the index action entirely from
ApplicationController, since its not very good practice
(ApplicationController isn't meant to define actions - it's more for
collecting before_filters and things like that).

If you'd like to talk a bit more about what you're trying to do with
the index action there, we can certainly give you some advice on what
to replace it with.



On Oct 29, 2:40 pm, Cris  wrote:
> Hi there, thanks for the reply.
>
> The actions are defined in index of ApplicationController. There is no
> error message, simply that the code within index is not invoked.
>
> I ran in production mode locally, and it indeed gives the same error.
>
> I checked the routes and they are the same, after running rake
> routes.
>
> Also I'm running rails 2.3.8
>
> It doesn't appear that code should be used in the index method of
> Action Controller...
>
> On Oct 29, 4:00 pm, Chris Hanks  wrote:
>
>
>
>
>
>
>
> > Can you explain what is actually happening? Is there an error message?
>
> > Also, actions aren't typically defined in the ApplicationController,
> > so I wouldn't be surprised if putting them there makes things iffy.
>
> > You can try running your app in production mode on your local machine
> > is order to see whether the problem is the environment or Heroku (try
> > "rails s production" at the command line).
>
> > On Oct 29, 12:33 pm, Cris  wrote:
>
> > > I should have also added the routing problems occur in the production
> > > environment (on heroku) but not in dev environment.
>
> > > Thanks
>
> > > On Oct 29, 2:15 pm, Cris  wrote:
>
> > > > Hi there, I'm having problems with routing in my heroku environment
> > > > heroku.
>
> > > > I have this redirect in the index method of the application
> > > > controller.
>
> > > > class ApplicationController < ActionController::Base
>
> > > > .
>
> > > > def index
>
> > > > redirect_to root_url
>
> > > > end
>
> > > > end
>
> > > > this works perfectly in my local environment yet in heroku it fails
> > > > (does not get redirectly). All other routing is functioning correctly,
> > > > all except for the index method of ApplicationController. Is there
> > > > something that is causing this in the heroku environment that I have
> > > > overlooked? Thanks in advance, I'm new to the heroku environment.
>
> > > > Thanks,
>
> > > > Cris

-- 
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: Sendgrid questions

2010-10-29 Thread chris
Pretty sure they'll just charge you... their regular plans (
http://sendgrid.com/pricing.html ) all have a "Price per email
thereafter"

To access the Sendgrid web interface, run 'heroku config' and look for
the ENV variables SENDGRID_PASSWORD and SENDGRID_USERNAME. Use those
to login at sendgrid.com !


On Oct 29, 3:09 pm, Russell Quinn  wrote:
> * What happens if I exceed my quota?
> * How do we access the Sendgrid web interface from our Heroku account?

-- 
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 routing issues

2010-10-29 Thread Chris Hanks
Can you explain what is actually happening? Is there an error message?

Also, actions aren't typically defined in the ApplicationController,
so I wouldn't be surprised if putting them there makes things iffy.

You can try running your app in production mode on your local machine
is order to see whether the problem is the environment or Heroku (try
"rails s production" at the command line).



On Oct 29, 12:33 pm, Cris  wrote:
> I should have also added the routing problems occur in the production
> environment (on heroku) but not in dev environment.
>
> Thanks
>
> On Oct 29, 2:15 pm, Cris  wrote:
>
>
>
>
>
>
>
> > Hi there, I'm having problems with routing in my heroku environment
> > heroku.
>
> > I have this redirect in the index method of the application
> > controller.
>
> > class ApplicationController < ActionController::Base
>
> > .
>
> > def index
>
> > redirect_to root_url
>
> > end
>
> > end
>
> > this works perfectly in my local environment yet in heroku it fails
> > (does not get redirectly). All other routing is functioning correctly,
> > all except for the index method of ApplicationController. Is there
> > something that is causing this in the heroku environment that I have
> > overlooked? Thanks in advance, I'm new to the heroku environment.
>
> > Thanks,
>
> > Cris

-- 
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: Bundler upgrade to 1.0.3 to support BUNDLE_WITHOUT?

2010-10-28 Thread Chris Hanks
Yep, it's worked for me for weeks too.


On Oct 28, 7:28 am, marcel  wrote:
> BUNDLE_WITHOUT is currently working for me. It magically started being
> recognized a few weeks ago. From my heroku config output:
>
> BUNDLE_WITHOUT                    => test development
>
> And when I deploy:
>
> -> Heroku receiving push
> -> Rails app detected
> -> Gemfile detected, running Bundler version 1.0.0
>        Unresolved dependencies detected; Installing...
>        Using --without test development
>        Fetching source index forhttp://rubygems.org/
> ...

-- 
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: Dalli & memcached not hitting the cache

2010-10-18 Thread Chris Hanks
You can use groups with heroku + bundler. For example, I do:

heroku config:add BUNDLE_WITHOUT="development test"

source :rubygems
gem 'rails', '3.0.0'
group :development, :test do
  gem 'rspec-rails', '2.0.0'
  # etc...
end

Then, Heroku doesn't install any of the RSpec gems.

Anyway, it's a bad idea to leave Gemfile.lock out of version control,
because then you can't be sure everyone's using the same version of
every gem, and you could run into troubles.




On Oct 18, 2:52 pm, chris  wrote:
> You can't use groups w/ heroku + bundler. You can do something like
> "if RUBY_PLATFORM =~ /darwin/" ... but then you'll run into problems
> if you have your Gemfile.lock checked in. To get around this, we just
> don't check in the Gemfile.lock.
>
> To make sure it's working locally, I'd start memcached with "memcached
> -" -- that way, you'll be able to see the log directly... which is
> the best way to determine whether it's your applications fault or
> heroku's. You should see something like:
>
> ree-1.8.7-2010.02 > Rails.cache.write("foo", 1)
>
> ... and in the memcached log:
>
> <8 set foo 0 0 107
>
> > NOT FOUND foo
> >8 STORED
>
> ree-1.8.7-2010.02 > Rails.cache.read("foo")
>
> <8 get foo
>
> > FOUND KEY foo
> >8 sending key foo
> >8 END
>
> ree-1.8.7-2010.02 > Rails.cache.read("foo-idontexist")
>  => nil
>
> <8 get foo-idontexist
>
> > NOT FOUND foo-idontexist
> >8 END
>
> On Oct 18, 9:40 am, Joost Schuur  wrote:
>
>
>
> > I've been experimenting with memcached and read good things about the
> > dalli gem, so I thought I'd try it out on Heroku. I can't seem to get
> > it to work and m not getting back any obvious errors either.
>
> > My production.rb defines:
>
> > config.action_controller.perform_caching = true
> > config.cache_store = :dalli_store
>
> > ...and in my Gemfile:
>
> > gem 'dalli'
>
> > However, based on the logs, it's not reading from the cache. Upon
> > refreshing the page in question twice (to make sure the cache was
> > written the first time around), I still get this:
>
> > Exist fragment? views/front_sidebar (506.9ms)
> > Write fragment views/front_sidebar (508.3ms)
>
> > Likewise, from the heroku console for the app in question:>> 
> > Rails.cache.write('hello', 'world')
> > => false
> > >> Rails.cache.read('hello')
>
> > => nil
>
> > I've restarted the heroku server during my tests too, and have
> > confirmed that I have the add-on installed (the app name is
> > tvgridthing-stage, if a Heroku rep would like to take a look).
>
> > I don't know what other debug tools there are for dalli. I tried
> > checking the stats, but the instructions 
> > athttp://docs.heroku.com/memcache#getting-stats-on-usage
> > obviously don't apply to dalli, which doesn't seem to have a stats
> > command.
>
> > Locally on my Mac, things seem to work just fine, based on the
> > presence of 'Read fragment views/front_sidebar (0.0ms)' in the logs.
>
> > I'm running Rails 3.0.1 and dalli 0.10.0 FWIW.
>
> > Then I thought I'd try the standard memcached instead, so I added this
> > to my Gemfile
>
> > group :production do
> >   gem "memcache-client"
> >   gem 'memcached-northscale', :require => 'memcached'
> > end
>
> > ...and in production.rb:
> > config.cache_store = :mem_cache_store, Memcached::Rails.new
>
> > Unfortunately, despite the :production group, when I went to do a
> > bundle install locally first, it tries to compile native extensions
> > under Mac OS X for memcached-northscale, and I get a compile error
> > that's been discussed here too:
>
> >http://osdir.com/ml/ruby-talk/2010-02/msg01693.html
>
> > Should I be able to tell bundle what environment to run under, so that
> > it'll ignore that on development and thus bypass any attempt to
> > install memcached-norrthscale?

-- 
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: Dalli & memcached not hitting the cache

2010-10-18 Thread chris
You can't use groups w/ heroku + bundler. You can do something like
"if RUBY_PLATFORM =~ /darwin/" ... but then you'll run into problems
if you have your Gemfile.lock checked in. To get around this, we just
don't check in the Gemfile.lock.

To make sure it's working locally, I'd start memcached with "memcached
-" -- that way, you'll be able to see the log directly... which is
the best way to determine whether it's your applications fault or
heroku's. You should see something like:

ree-1.8.7-2010.02 > Rails.cache.write("foo", 1)

... and in the memcached log:

<8 set foo 0 0 107
> NOT FOUND foo
>8 STORED

ree-1.8.7-2010.02 > Rails.cache.read("foo")

<8 get foo
> FOUND KEY foo
>8 sending key foo
>8 END

ree-1.8.7-2010.02 > Rails.cache.read("foo-idontexist")
 => nil

<8 get foo-idontexist
> NOT FOUND foo-idontexist
>8 END


On Oct 18, 9:40 am, Joost Schuur  wrote:
> I've been experimenting with memcached and read good things about the
> dalli gem, so I thought I'd try it out on Heroku. I can't seem to get
> it to work and m not getting back any obvious errors either.
>
> My production.rb defines:
>
> config.action_controller.perform_caching = true
> config.cache_store = :dalli_store
>
> ...and in my Gemfile:
>
> gem 'dalli'
>
> However, based on the logs, it's not reading from the cache. Upon
> refreshing the page in question twice (to make sure the cache was
> written the first time around), I still get this:
>
> Exist fragment? views/front_sidebar (506.9ms)
> Write fragment views/front_sidebar (508.3ms)
>
> Likewise, from the heroku console for the app in question:>> 
> Rails.cache.write('hello', 'world')
> => false
> >> Rails.cache.read('hello')
>
> => nil
>
> I've restarted the heroku server during my tests too, and have
> confirmed that I have the add-on installed (the app name is
> tvgridthing-stage, if a Heroku rep would like to take a look).
>
> I don't know what other debug tools there are for dalli. I tried
> checking the stats, but the instructions 
> athttp://docs.heroku.com/memcache#getting-stats-on-usage
> obviously don't apply to dalli, which doesn't seem to have a stats
> command.
>
> Locally on my Mac, things seem to work just fine, based on the
> presence of 'Read fragment views/front_sidebar (0.0ms)' in the logs.
>
> I'm running Rails 3.0.1 and dalli 0.10.0 FWIW.
>
> Then I thought I'd try the standard memcached instead, so I added this
> to my Gemfile
>
> group :production do
>   gem "memcache-client"
>   gem 'memcached-northscale', :require => 'memcached'
> end
>
> ...and in production.rb:
> config.cache_store = :mem_cache_store, Memcached::Rails.new
>
> Unfortunately, despite the :production group, when I went to do a
> bundle install locally first, it tries to compile native extensions
> under Mac OS X for memcached-northscale, and I get a compile error
> that's been discussed here too:
>
> http://osdir.com/ml/ruby-talk/2010-02/msg01693.html
>
> Should I be able to tell bundle what environment to run under, so that
> it'll ignore that on development and thus bypass any attempt to
> install memcached-norrthscale?

-- 
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: Pushing a Rails app without the rails gem.

2010-10-18 Thread Chris Hanks
It's a Rails 3 app, so it has an automatically generated config.ru.
Thanks for the suggestion, though.



On Oct 18, 9:38 am, Jimmy Thrasher  wrote:
> I'm not sure about this, but you could try setting up a config.ru file to
> manually start up your Rails app.  My suspicion is that it's failing to find
> config.ru, auto-detecting a Rails app, and not finding all the gems.
>
> Just some thoughts.. maybe you've already done all that.  :)
>
> Jimmy
>
> On Mon, Oct 18, 2010 at 12:33 PM, Chris Hanks 
>
>
>
>
> > wrote:
> > There's a lot of parts of Rails that my app has no use for
> > (activerecord, actionmailer, activeresource, and all their associated
> > dependencies like arel, mail, and so on), and I'm trying to take
> > advantage of the new modularity in Rails 3. In my Gemfile I've
> > replaced the rails dependency with:
>
> > gem 'railties', '3.0.0'
> > gem 'actionpack', '3.0.0'
> > gem 'activesupport', '3.0.0'
>
> > And my app works totally fine this way, except that Heroku won't
> > accept it, saying:
>
> > -> Rails app detected
> >  !     Heroku Bamboo does not include any Rails gems by default.
> >  !     You'll need to declare it in either .gems or Gemfile.
> >  !     Seehttp://docs.heroku.com/gemsfor details on specifying gems.
> >  !     Heroku push rejected, no Rails gem specified.
>
> > Is there a workaround for this? Something I can change to not trigger
> > the Rails app detection? I understand the need for the warning, but
> > ideally, I think my invocation of 'railties' would signify to Heroku
> > that I know what I'm doing.
>
> > 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.
>
> --
> +1-919-627-7546

-- 
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.



Pushing a Rails app without the rails gem.

2010-10-18 Thread Chris Hanks
There's a lot of parts of Rails that my app has no use for
(activerecord, actionmailer, activeresource, and all their associated
dependencies like arel, mail, and so on), and I'm trying to take
advantage of the new modularity in Rails 3. In my Gemfile I've
replaced the rails dependency with:

gem 'railties', '3.0.0'
gem 'actionpack', '3.0.0'
gem 'activesupport', '3.0.0'

And my app works totally fine this way, except that Heroku won't
accept it, saying:

-> Rails app detected
 ! Heroku Bamboo does not include any Rails gems by default.
 ! You'll need to declare it in either .gems or Gemfile.
 ! See http://docs.heroku.com/gems for details on specifying gems.
 ! Heroku push rejected, no Rails gem specified.

Is there a workaround for this? Something I can change to not trigger
the Rails app detection? I understand the need for the warning, but
ideally, I think my invocation of 'railties' would signify to Heroku
that I know what I'm doing.

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: Dogpile effect with Varnish?

2010-10-13 Thread Chris Hanks
Thanks, Ben!


On Oct 13, 2:40 pm, Ben Scofield  wrote:
> Sorry for the delay! I finally talked to our Varnish expert, and he
> confirmed that:
>
> 1) our configuration should not impede Varnish's default behavior (re:
> the first question in this thread), and
>
> 2) your app's resource configuration (# of dynos, etc.) doesn't affect
> how much traffic Varnish can handle for it. Our best estimate for
> Varnish's capacity for a single cached URL is on the order of 4000
> requests/second, sustained.
>
> I haven't dug deeply into your other thread yet, Thomas -- I'll take
> another look at it when I can.
>
> Ben
>
> On Oct 12, 11:13 am, Thomas Balthazar  wrote:
>
>
>
> > Hi Ben,
>
> > Any update about this?
>
> > Thanks,
> > Thomas.
>
> > On Tue, Oct 5, 2010 at 8:33 PM, Thomas Balthazar  
> > wrote:
> > > Hello Ben,
>
> > > I just read you were about to talk to the Varnish specialist at Heroku.
> > > I would really appreciate if you took the time to help me to find the
> > > answer to those 2 unanswered questions about Varnish and caching :
> > >http://groups.google.com/group/heroku/browse_thread/thread/8e39658d53...
> > >http://groups.google.com/group/heroku/browse_thread/thread/fd23e886c2...
>
> > > Thanks in advance for your help!
> > > Thomas.
>
> > > On Tue, Oct 5, 2010 at 7:52 PM, Ben Scofield  wrote:
> > >> Not sure why this didn't come through earlier, but:
>
> > >> I tried out a few experiments, and it looks like our setup doesn't
> > >> interfere with this default behavior. I'm going to talk to someone
> > >> with more intimate knowledge of our Varnish config to confirm that,
> > >> but so far it looks promising.
>
> > >> Ben
>
> > >> On Oct 5, 12:00 pm, Chris Hanks  wrote:
> > >>> Is anyone from Heroku around that might know how their setup works?
>
> > >>> On Oct 2, 8:42 pm, Chris Hanks  wrote:
>
> > >>> > I'm wondering about Heroku's use of Varnish. Suppose I have a page
> > >>> > that is expensive to produce (lots of database queries) but can be
> > >>> > cached in Varnish. Right after Varnish's copy expires, if it's very
> > >>> > popular, I might have a dozen people accessing it simultaneously
> > >>> > before the newly created version can be stashed in Varnish.
>
> > >>> > So, based on a thread I found (http://www.gossamer-threads.com/lists/
> > >>> > varnish/misc/14750) it looks like Varnish is smart enough by default
> > >>> > to only send that expensive request to my backend once, and serve up
> > >>> > the response to all the people waiting for it (to prevent a dogpiling
> > >>> > effect). But I know that Heroku has its own configuration for Varnish
> > >>> > (with lots of servers in a hash ring), and I was wondering whether
> > >>> > it's still set up to do 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 
> > >> 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: Compiled Slug size not changing after removing large gems from Gemfile

2010-10-12 Thread Chris Hanks
According to the Heroku docs (http://docs.heroku.com/slug-compiler),
the git repository is not included in the slug.

I've had the same experience as Stephen - I'd specify gems in my
Gemfile that would push the slug size up, and then remove them without
any effect to the slug size. Then I could destroy the app, create a
new one from the same git repository and wind up with a smaller slug
size than I'd had before.



On Oct 11, 11:52 pm, Keenan Brock  wrote:
> Hi Stephen,
>
> If you checked in a gem into git
> Then you deleted the gem from git.
> Git still has the gem.
> It is not showing up for today, but git log will show when you added it and 
> removed it.
>
> Guess I do not know if you are checking in your bundle dir and gems into git.
>
> 1. So are you saying your repo is 17mb, or your slug is 17mb?
>
> I'd imagine that the slug would be smaller on your change to the Gemfile.
> But you stating that your slug is big suggests that maybe the .git directory 
> is included in the slug?
>
> The slug size does affect the speed in which a dyno is started / compiles / 
> restarts.
> But I agree with Chris, I can't imagine it would slow it down too much.
>
> --Keenan
> On Oct 12, 2010, at 12:48 AM, Chris Hanks wrote:
>
>
>
> > Yeah, this has happened to me before, too. I'm pretty sure the problem
> > is on Heroku's end.
>
> > I don't worry that much about it, though, since the max slug size is
> > 100 MB.
>
> > On Oct 11, 8:57 pm, stephen murdoch 
> > wrote:
> >> I have encountered a few strange problems with Heroku this evening.
>
> >> My repo size somehow managed to bloat to 17mb so I removed some gems
> >> from my Gemfile (ran bundle install, git add Gemfile.lock etc etc) and
> >> found that my repo was still 17mb.
>
> >> I removed all my gems (apart from rails and pg) and the repo didn't
> >> get any smaller.  My app is no bigger than 2mb.
>
> >> So I deleted my app (along with my .git and .bundle directories) and
> >> created everything from scratch.
>
> >> This seemed to fix the problem, until just now, when I tried to remove
> >> 4 large gems from my Gemfile and didn't see any change in the size of
> >> my compiled slug on Heroku.
>
> >> Is this something that other people are experiencing?
>
> >> FWIW, I've tried everything I can think of, including removing
> >> Gemfile.lock, .bundle etc etc
>
> > --
> > 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: Compiled Slug size not changing after removing large gems from Gemfile

2010-10-11 Thread Chris Hanks
Yeah, this has happened to me before, too. I'm pretty sure the problem
is on Heroku's end.

I don't worry that much about it, though, since the max slug size is
100 MB.



On Oct 11, 8:57 pm, stephen murdoch 
wrote:
> I have encountered a few strange problems with Heroku this evening.
>
> My repo size somehow managed to bloat to 17mb so I removed some gems
> from my Gemfile (ran bundle install, git add Gemfile.lock etc etc) and
> found that my repo was still 17mb.
>
> I removed all my gems (apart from rails and pg) and the repo didn't
> get any smaller.  My app is no bigger than 2mb.
>
> So I deleted my app (along with my .git and .bundle directories) and
> created everything from scratch.
>
> This seemed to fix the problem, until just now, when I tried to remove
> 4 large gems from my Gemfile and didn't see any change in the size of
> my compiled slug on Heroku.
>
> Is this something that other people are experiencing?
>
> FWIW, I've tried everything I can think of, including removing
> Gemfile.lock, .bundle etc etc

-- 
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: You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control

2010-10-11 Thread Chris Hanks
First, to prevent Heroku from installing certain gems, use the
BUNDLE_WITHOUT config var to specify groups you want to skip. For
example, I do:

heroku config:add BUNDLE_WITHOUT="development test"

Then, in my Gemfile:

source :rubygems
gem 'rails', '3.0.0'
group :development, :test do
  gem 'rspec-rails', '2.0.0'
  # etc...
end

Now Heroku won't install any of the rspec gems.

Second, try running "bundle update" after updating a gem in the
Gemfile, and it will recalculate all your dependencies and update your
Gemfile.lock for you. What's even better, though, is to only update
gems you specify - for example, run "bundle update rails" if you
change the rails version in your Gemfile. That way, Bundler will only
update the things it really needs to, which is safer.



On Oct 11, 9:09 pm, stephen murdoch 
wrote:
> I get this error message every now and then:
>
> You have modified your Gemfile in development but did not check the
> resulting snapshot (Gemfile.lock) into version control
>
> Most people suggest removing the .bundle directory and running bundle
> install again making sure to add Gemfile.lock to the git repo before
> committing and pushing to heroku but that doesn't always resolve the
> problem.
>
> The easiest way to fix this is by removing Gemfile.lock and pushing to
> heroku without it.  Heroku then bundles your gems for you, but informs
> you that you will soon be required to include a Gemfile.lock.
>
> I am trying to get my head round this problem.
>
> Can anyone tell my why this happens?
>
> I have on occasions tried wrapping certain gems in my Gemfile within
> and 'if statement' to prevent heroku from installing them as I only
> want them on my dev box.  The error only seems to happen in apps that
> I've used this technique.  Perhaps this is the source of these
> problems?
>
> When will Heroku start requiring you to add a Gemfile.lock and what
> are the best ways of preventing this problem?

-- 
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.



502 errors and huge response time spikes

2010-10-08 Thread Chris
Since about 10 CST this morning we've been getting intermittent spikes
in response times upwards of 150 seconds...new relic just shows huge
gaps in the trace details that don't correspond to anything
specifically...the timeline just jumps 150 seconds or so.

Anyone else having issues like this?

-- 
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: Koi (how variable is variable?) vs. Ronin (expensive!) vs. Amazon RDS (winner?)

2010-10-07 Thread chris
It really depends a lot on how well you leverage caching. We run a
~1.5mil page views / month site on heroku with just two (2!) dynos and
koi. But our pages are cached for ~3 hours via varnish, which heroku
provides for free. All users see (essentially) the same version of the
site, barring JS-driven login/logout links, and certain admin
functionality.

One thing you should keep in mind is that amazon RDS is mysql based
and heroku runs postgres DBs.


On Oct 7, 10:42 pm, mattsly  wrote:
> I really want to pull the trigger with Heroku.  I love so much of it.
> I'm looking to move over a ~500K page views/month site that is
> decently data intensive, and still weighing my options wrt database,
> which may make or break my decision to use Heroku vs. EY, etc, given
> the price differences.
>
> Koi seems like a great deal. 20 GB is plenty for my app.  My
> benchmarks so far seem promising. But "variable" performance has me
> concerned a bit...does anyone have more concrete numbers on just what
> that means?  Anyone running decently high traffic sites on just Koi?
>
> The jump to Ronin is obviously dramatic in terms of price.  Is there
> any more info on just what a "compute unit" is?  Like RAM and I/O
> specs? It seems to me, given EC2 prices ("small ec2 is ~85/month
> variable, and large = ~910/year term < $100/month), that there should
> be a dedicated option for less than $200/month.  Any hints of a Koi-
> like price drop in the near future here?  My 2 cents to Heroku's
> pricing team would be treat the data layer as a break-even loss
> leader, and make up the revenue on the dyno/worker side...
>
> Amazon RDS seems like quite possibly the way to go.  3 year term for a
> small instance (1.7 GB) is $350 < 2 months of the cost of a Ronin
> instance! Has anyone gone this route and had success? Should I be
> worried about latency between Heroku and RDS? (it's all EC2, right?)
> Which zone should I have a DB placed in? (Virginia vs. California?)
>
> m

-- 
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: Dogpile effect with Varnish?

2010-10-06 Thread Chris Hanks
Thanks for looking into this stuff, Ben.



On Oct 5, 11:33 am, Thomas Balthazar  wrote:
> Hello Ben,
>
> I just read you were about to talk to the Varnish specialist at Heroku.
> I would really appreciate if you took the time to help me to find the
> answer to those 2 unanswered questions about Varnish and caching 
> :http://groups.google.com/group/heroku/browse_thread/thread/8e39658d53...http://groups.google.com/group/heroku/browse_thread/thread/fd23e886c2...
>
> Thanks in advance for your help!
> Thomas.
>
>
>
> On Tue, Oct 5, 2010 at 7:52 PM, Ben Scofield  wrote:
> > Not sure why this didn't come through earlier, but:
>
> > I tried out a few experiments, and it looks like our setup doesn't
> > interfere with this default behavior. I'm going to talk to someone
> > with more intimate knowledge of our Varnish config to confirm that,
> > but so far it looks promising.
>
> > Ben
>
> > On Oct 5, 12:00 pm, Chris Hanks  wrote:
> >> Is anyone from Heroku around that might know how their setup works?
>
> >> On Oct 2, 8:42 pm, Chris Hanks  wrote:
>
> >> > I'm wondering about Heroku's use of Varnish. Suppose I have a page
> >> > that is expensive to produce (lots of database queries) but can be
> >> > cached in Varnish. Right after Varnish's copy expires, if it's very
> >> > popular, I might have a dozen people accessing it simultaneously
> >> > before the newly created version can be stashed in Varnish.
>
> >> > So, based on a thread I found (http://www.gossamer-threads.com/lists/
> >> > varnish/misc/14750) it looks like Varnish is smart enough by default
> >> > to only send that expensive request to my backend once, and serve up
> >> > the response to all the people waiting for it (to prevent a dogpiling
> >> > effect). But I know that Heroku has its own configuration for Varnish
> >> > (with lots of servers in a hash ring), and I was wondering whether
> >> > it's still set up to do 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 
> > 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: Dogpile effect with Varnish?

2010-10-05 Thread Chris Hanks
Is anyone from Heroku around that might know how their setup works?



On Oct 2, 8:42 pm, Chris Hanks  wrote:
> I'm wondering about Heroku's use of Varnish. Suppose I have a page
> that is expensive to produce (lots of database queries) but can be
> cached in Varnish. Right after Varnish's copy expires, if it's very
> popular, I might have a dozen people accessing it simultaneously
> before the newly created version can be stashed in Varnish.
>
> So, based on a thread I found (http://www.gossamer-threads.com/lists/
> varnish/misc/14750) it looks like Varnish is smart enough by default
> to only send that expensive request to my backend once, and serve up
> the response to all the people waiting for it (to prevent a dogpiling
> effect). But I know that Heroku has its own configuration for Varnish
> (with lots of servers in a hash ring), and I was wondering whether
> it's still set up to do 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: inconsistent Memcache reads

2010-10-05 Thread chris
It does sound like your cache might be full. You can use
Rails.cache.stats to see various stats, including how much memory
you're using. Docs are at the vey bottom of http://docs.heroku.com/memcache

On Oct 2, 7:58 pm, Brandon Casci  wrote:
> Hello
>
> I'm new to Heroku, so I'm not sure if this is a problem, or normal behavior.
>
> I'm seeing a inconsistent memcache reads. Reading a key will sometimes
> alternate between nil and the value placed in memcache. Other times the
> value just seems to vanish, though that could be a sign that memcache is
> full, though I can't find a way to tell if it's full.
>
> What do es everyone think might be happening?
>
> --
> =
> Brandon Casci
> Loudcasterhttp://loudcaster.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.



Dogpile effect with Varnish?

2010-10-02 Thread Chris Hanks
I'm wondering about Heroku's use of Varnish. Suppose I have a page
that is expensive to produce (lots of database queries) but can be
cached in Varnish. Right after Varnish's copy expires, if it's very
popular, I might have a dozen people accessing it simultaneously
before the newly created version can be stashed in Varnish.

So, based on a thread I found (http://www.gossamer-threads.com/lists/
varnish/misc/14750) it looks like Varnish is smart enough by default
to only send that expensive request to my backend once, and serve up
the response to all the people waiting for it (to prevent a dogpiling
effect). But I know that Heroku has its own configuration for Varnish
(with lots of servers in a hash ring), and I was wondering whether
it's still set up to do 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: Getting a visitors ip address in your web app

2010-09-29 Thread chris
Still is a problem if you're using the "Hostname Based Custom SSL" --
in order to get the users IP address, you'll have to use "IP Based
Custom SSL" and pay $80 more per month :(

On Sep 29, 1:44 pm, Keenan Brock  wrote:
> This used to be a problem with ssl.
> Don't think it has been resolved
>
> --Keenan
>
> On Sep 29, 2010, at 1:38 PM, Aaron Brethorst wrote:
>
> > I haven't tried this with Heroku, but with another app I had hosted on EC2 
> > I was able to use request.env['HTTP_X_FORWARDED_FOR'] to get this.
>
> > On Sep 28, 2010, at 2:45 AM, Josh K wrote:
>
> >> Hi Guys,
>
> >> We have a web app deployed on Heroku which requires ip address logging
> >> of each request, but we noticed that the ip address is always a
> >> 10.*.*.* address (local) instead of a valid address from the
> >> interwebs. After reading a little into this I found out that this may
> >> be due Amazon LBS and there may be a box config work around available,
> >> although I am not 100% sure on this.
>
> >> Can anyone at Heroku tell me if there is any way to get a requests ip
> >> address, and if not currently, if there are plans to enable this
> >> functionality?
>
> >> Many Thanks,
>
> >> Josh
>
> >> --
> >> 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 
> > 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.



rake aborted! Don't know how to build task 'jobs:work'

2010-09-27 Thread Chris Kalaboukis
hi guys: just installed the delayed_jobs gem and am now getting this
error.


rake aborted!
Don't know how to build task 'jobs:work'

Has anyone had this error?

Thanks...Chris

-- 
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 Mongoid config and how it works

2010-09-27 Thread Chris Hanks
I guess they wanted the MongoHQ addon to "just work" with Mongoid in
addition to MongoMapper.


On Sep 27, 4:58 pm, Bradley  wrote:
> ya you're right, those env vars exist.
>
> i wonder why the docs on this are so sparse, and how the author of
> this template found this out.  I haven't been able to locate anything
> that gives an indication that this is happening.
>
> On Sep 27, 11:44 am, Chris Hanks 
> wrote:
>
>
>
> > Heroku might be breaking up the ENV['MONGOHQ_URL'] into those
> > components for you. Try "heroku console" from your command line and
> > then "ENV['MONGOID_HOST']" to see if it's present.
>
> > On Sep 27, 6:51 am, Abel Tamayo  wrote:
>
> > > It seems MongoMapper is more popular around here. At least it's the 
> > > solution
> > > I'm using and works flawlessly with Heroku.
>
> > > On Mon, Sep 27, 2010 at 2:33 PM, Bradley  
> > > wrote:
> > > > no one has a comment on this?  I thought it'd be a fairly straight
> > > > forward answer.
>
> > > > On Sep 22, 7:11 pm, Bradley  wrote:
> > > > > I just used a template for a new rails app that sets up everything for
> > > > > use with Mongoid.  The mongoid.yml file looks like this:
>
> > > > > production:
> > > > >   host: <%= ENV['MONGOID_HOST'] %>
> > > > >   port: <%= ENV['MONGOID_PORT'] %>
> > > > >   username: <%= ENV['MONGOID_USERNAME'] %>
> > > > >   password: <%= ENV['MONGOID_PASSWORD'] %>
> > > > >   database: <%= ENV['MONGOID_DATABASE'] %>
>
> > > > > I added the MONGOHQ_URL config var to my app (with the string given
> > > > > from mongohq), deployed and it worked!  My question is...    HOW?
>
> > > > > I don't get how adding that single URL has all of a sudden given me
> > > > > these 5 environment variables.  I searched through the heroku docs on
> > > > > mongo and they pretty sparse.  Nowhere does it mention that I might
> > > > > use these particular env vars.  So how does this happen?
>
> > > > --
> > > > 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 Mongoid config and how it works

2010-09-27 Thread Chris Hanks
Heroku might be breaking up the ENV['MONGOHQ_URL'] into those
components for you. Try "heroku console" from your command line and
then "ENV['MONGOID_HOST']" to see if it's present.



On Sep 27, 6:51 am, Abel Tamayo  wrote:
> It seems MongoMapper is more popular around here. At least it's the solution
> I'm using and works flawlessly with Heroku.
>
>
>
> On Mon, Sep 27, 2010 at 2:33 PM, Bradley  wrote:
> > no one has a comment on this?  I thought it'd be a fairly straight
> > forward answer.
>
> > On Sep 22, 7:11 pm, Bradley  wrote:
> > > I just used a template for a new rails app that sets up everything for
> > > use with Mongoid.  The mongoid.yml file looks like this:
>
> > > production:
> > >   host: <%= ENV['MONGOID_HOST'] %>
> > >   port: <%= ENV['MONGOID_PORT'] %>
> > >   username: <%= ENV['MONGOID_USERNAME'] %>
> > >   password: <%= ENV['MONGOID_PASSWORD'] %>
> > >   database: <%= ENV['MONGOID_DATABASE'] %>
>
> > > I added the MONGOHQ_URL config var to my app (with the string given
> > > from mongohq), deployed and it worked!  My question is...    HOW?
>
> > > I don't get how adding that single URL has all of a sudden given me
> > > these 5 environment variables.  I searched through the heroku docs on
> > > mongo and they pretty sparse.  Nowhere does it mention that I might
> > > use these particular env vars.  So how does this happen?
>
> > --
> > 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: upload size limit?

2010-09-23 Thread chris
It's not like you can really store the files on heroku, so you're
probably better off using the flash based approach (linked at the
bottom of the docs) or POSTing the form directly to s3 (directions:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1434
)

On Sep 23, 1:38 pm, marcel  wrote:
> I'm curious if there is any kind of upload size (or time) limit? I saw
> some old discussions about a 10MB limit, but those are so old I don't
> trust them.
>
> I only found one place in the Heroku docs that "discourages"
> uploading files larger than 4 MB, but its not clear what the real
> limit is.
>
> http://docs.heroku.com/s3

-- 
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: Question about HTTP caching

2010-09-09 Thread Chris Hanks
Really? Why doesn't Heroku partition certain URLs to certain servers
(through a hashing scheme or something similar)?

I'm curious now :) How many servers are there?



On Sep 9, 5:18 pm, Pedro Belo  wrote:
> On a side note though, we run multiple caching servers - so there's no
> guarantee that Bob's request will hit the same server.
>
> If you need more control to your cache we recommend using Memcache.
>
> On Thu, Sep 9, 2010 at 5:14 PM, Chris Hanks
>
>
>
>  wrote:
> > Ok, thanks!
>
> > On Sep 9, 5:09 pm, Pedro Belo  wrote:
> >> At the time you told Heroku, 1pm.
>
> >> Thanks,
> >> Pedro
>
> >> On Thu, Sep 9, 2010 at 4:59 PM, Chris Hanks
>
> >>  wrote:
> >> > I've read through the caching docs, and "Things Caches Do", but I'm
> >> > still not clear on something, so here I am.
>
> >> > Suppose I signal Heroku to cache a page for an hour (setting the
> >> > 'Cache-Control' header to 'public, max-age=3600'). Alice visits the
> >> > page at noon, and Heroku stashes it in Varnish to expire at 1 p.m.
> >> > It's also cached in Alice's browser until 1 p.m., so that if she
> >> > requests it again before then, the request won't even reach Heroku.
>
> >> > Bob visits the same page at 12:30. Heroku still has it in Varnish, so
> >> > it returns it from there, and it's cached in Bob's browser. My
> >> > question is, when will Bob's browser expire it? At 1 p.m. (the time my
> >> > app told Heroku/Varnish it was good until), or 1:30 (one hour from the
> >> > time Bob received it)?
>
> >> > 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 
> >> > 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 
> > 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: Question about HTTP caching

2010-09-09 Thread Chris Hanks
Ok, thanks!


On Sep 9, 5:09 pm, Pedro Belo  wrote:
> At the time you told Heroku, 1pm.
>
> Thanks,
> Pedro
>
> On Thu, Sep 9, 2010 at 4:59 PM, Chris Hanks
>
>
>
>  wrote:
> > I've read through the caching docs, and "Things Caches Do", but I'm
> > still not clear on something, so here I am.
>
> > Suppose I signal Heroku to cache a page for an hour (setting the
> > 'Cache-Control' header to 'public, max-age=3600'). Alice visits the
> > page at noon, and Heroku stashes it in Varnish to expire at 1 p.m.
> > It's also cached in Alice's browser until 1 p.m., so that if she
> > requests it again before then, the request won't even reach Heroku.
>
> > Bob visits the same page at 12:30. Heroku still has it in Varnish, so
> > it returns it from there, and it's cached in Bob's browser. My
> > question is, when will Bob's browser expire it? At 1 p.m. (the time my
> > app told Heroku/Varnish it was good until), or 1:30 (one hour from the
> > time Bob received it)?
>
> > 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 
> > 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.



Question about HTTP caching

2010-09-09 Thread Chris Hanks
I've read through the caching docs, and "Things Caches Do", but I'm
still not clear on something, so here I am.

Suppose I signal Heroku to cache a page for an hour (setting the
'Cache-Control' header to 'public, max-age=3600'). Alice visits the
page at noon, and Heroku stashes it in Varnish to expire at 1 p.m.
It's also cached in Alice's browser until 1 p.m., so that if she
requests it again before then, the request won't even reach Heroku.

Bob visits the same page at 12:30. Heroku still has it in Varnish, so
it returns it from there, and it's cached in Bob's browser. My
question is, when will Bob's browser expire it? At 1 p.m. (the time my
app told Heroku/Varnish it was good until), or 1:30 (one hour from the
time Bob received it)?

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: Calling all forks

2010-09-02 Thread chris
In this case, I'd use a cron job. Cache the output every hour for $5/
month (or every day for free.)

On Sep 1, 1:50 am, Gabriel  wrote:
> This seems to be a somewhat common use case for Heroku:  I have a
> process that takes far too long to tie up a web request but doesn't
> happen often enough to warrant paying for a Worker.
>
> Right now I'm considering calling fork to handle this situation and I
> have two questions:
>
> 1.  Will this work on Heroku?  That is: are there any specifics about
> the Heroku architecture that would prevent forks?
>
> 2.  Is there a better way that doesn't involve having a Worker running
> all the time?  I've seen people mention that Workers can be spun up
> and deleted programmatically but I've yet to see what the API for
> doing so looks like.
>
> Thanks,
>
> Gabriel

-- 
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: Bundler 1.0.0 Rollout

2010-08-31 Thread chris
You're not alone -- would be great to have a solution for this.
Heroku's "official" stance is to just include them and don't worry
about the bloat, but obviously that won't work in your case.

On Aug 31, 2:32 pm, Ashley Moran 
wrote:
> On 30 Aug 2010, at 23:54, Terence Lee wrote:
>
> > In the near future we're going to start requiring the Gemfile.lock to be
> > checked into your git repository since this is the recommended deploy
> > path set by the bundler team.  Please take the time to do so if you
> > haven't already.
>
> There's an unfortunate downside to this.  Our Gemfile has gems that can't be 
> built on Heroku (autotest-fsevent, for example).  We avoided deployment 
> issues by altering the Gemfile to only bundle these on OS X:
>
>     if RUBY_PLATFORM =~ /darwin/
>       gem "autotest-fsevent"
>       # ...
>     end
>
> Then, we deliberately left the lock file out of Git so that Heroku would 
> bundle correctly without these gems while compiling the slug.
>
> Today we tried to update our deployment scripts to keep the lockfile in Git.  
> This now means we have to have a Rake task to set an environment variable 
> ENV["HEROKU"], re-bundle with a Gemfile that now looks like this...
>
>   unless ENV["HEROKU"]
>     gem "autotest-fsevent"
>     # ...
>   end
>
> ...then commit the lockfile to Git, and finally push to Heroku.
>
> We have other issues that I think we can resolve.  But the above feels like a 
> lot of hoop-jumping to get a lockfile on Heroku.
>
> I'd love to know if anyone has a solution to this problem.  Last time I asked 
> nobody had a simple workaround.  But that was April, I think, and Bundler and 
> Heroku have both changes since then.
>
> Or, are we alone in having OSX-specific gems in our Gemfile?
>
> Advice much appreciated
>
> Cheers
> Ash
>
> --http://www.patchspace.co.uk/http://www.linkedin.com/in/ashleymoran

-- 
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: free vs. paid heroku app performance

2010-08-31 Thread Chris Hanks
> What other questions do you guys have on the area that I should include?

Two:

What is Heroku's timeout when spinning up dynos/workers? I thought
that I'd seen this mentioned somewhere, but I can't find it now. I ask
because an app I'm thinking of would need to hit external services and
the database when starting up, which could take a while.

Is there a limit to how long a daily cron job can run? I'm planning on
some number crunching that could take up to an hour or so.

Thank you!

-- 
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: memcached-northscale gem on windows

2010-08-31 Thread chris
Don't know how to solve your issue, but just as an FYI, you don't need
memcached-northscale when you're doing development. The 'memcached'
gem will behave identically.

(Just make sure to use memcached-northscale when you're pushing your
app to heroku)

On Aug 28, 6:45 am, tmac22  wrote:
> I'm trying to install the memcached-northscale gem on Windows.  Do I
> need the cyrus-sasl2 library?
>
> c:\>gem install memcached-northscale
> Building native extensions.  This could take a while...
> ERROR:  Error installing memcached-northscale:
>         ERROR: Failed to build gem native extension.
>
> C:/Ruby187/bin/ruby.exe extconf.rb
> Building libmemcached.
> tar xzf libmemcached-0.32.tar.gz 2>&1
> Patching libmemcached source.
> patch -p1 -Z < libmemcached.patch
> patching file `libmemcached-0.32/libmemcached/memcached_response.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_response.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached.h'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached.h' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_connect.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_connect.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_hash.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_hash.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_hosts.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_hosts.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_storage.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_storage.c' (time mismatch)
> Patching libmemcached with SASL support.
> patch -p1 -Z < sasl.patch
> patching file `libmemcached-0.32/aclocal.m4'
> patching file `libmemcached-0.32/clients/client_options.h'
> patching file `libmemcached-0.32/clients/Makefile.am'
> patching file `libmemcached-0.32/clients/Makefile.in'
> patching file `libmemcached-0.32/clients/memcat.c'
> patching file `libmemcached-0.32/clients/memcp.c'
> patching file `libmemcached-0.32/clients/memdump.c'
> patching file `libmemcached-0.32/clients/memflush.c'
> patching file `libmemcached-0.32/clients/memrm.c'
> patching file `libmemcached-0.32/clients/memslap.c'
> patching file `libmemcached-0.32/clients/utilities.c'
> patching file `libmemcached-0.32/clients/utilities.h'
> The next patch would create the file `libmemcached-0.32/config/
> config.rpath',
> which already exists!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to libmemcached-0.32/config/
> config.rpath.rej
> patching file `libmemcached-0.32/config.h.in'
> patching file `libmemcached-0.32/configure'
> patching file `libmemcached-0.32/configure.ac'
> patching file `libmemcached-0.32/docs/Makefile.am'
> patching file `libmemcached-0.32/docs/Makefile.in'
> The next patch would create the file `libmemcached-0.32/docs/
> memcached_sasl.pod',
> which already exists!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to libmemcached-0.32/docs/
> memcached_sasl.pod.rej
> patching file `libmemcached-0.32/libmemcached/Makefile.am'
> patching file `libmemcached-0.32/libmemcached/Makefile.in'
> patching file `libmemcached-0.32/libmemcached/memcached/
> protocol_binary.h'
> patching file `libmemcached-0.32/libmemcached/memcached_configure.h'
> patching file `libmemcached-0.32/libmemcached/
> memcached_configure.h.in'
> patching file `libmemcached-0.32/libmemcached/memcached_connect.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_connect.c' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_constants.h'
> patching file `libmemcached-0.32/libmemcached/memcached.h'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached.h' (time mismatch)
> patching file `libmemcached-0.32/libmemcached/memcached_response.c'
> not setting time of file `libmemcached-0.32/libmemcached/
> memcached_response.c' (time mismatch)
> The next patch would create the file `libmemcached-0.32/libmemcached/
> memcached_sasl.c',
> which already exists!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to libmemcached-0.32/
> libmemcached/memcached_sasl.c.rej
> The next patch would create the file `libmemcached-0.32/libmemcached/
> memcached_sasl.h',
> which already exists!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to libmemcached-0.32/
> libmemcached/memcached_sasl.h.rej
> patching file `libmemcached-0.32/libmemcached/memcached_strerror.c'
> patching file `libmemcached-0.32/libmemcachedutil/Makefile.in'
> The next patch w

Re: Can't push new code

2010-08-31 Thread chris
Type 'gem sources' on a console and you'll probably see github in
there. "gem sources -r http://github.com/"; should remove it.

On Aug 30, 8:06 pm, brianp  wrote:
> I get this error every time but none of my gems source github.
>
>        WARNING:  RubyGems 1.2+ index not found for:
>        http://github.com/
>
> .gems file included -http://www.pastie.org/1127841
>
> Cheers,
> bp

-- 
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: Backup for MongoHQ Data

2010-08-26 Thread Chris Hanks
Not sure what that error message means, sorry. You might ask in the
MongoDB google group - 10gen is good about helping users with issues:

http://groups.google.com/group/mongodb-user

Also, I should have mentioned before that there's a guide to
mongorestore and the other MongoDB import/export tools here:

http://www.mongodb.org/display/DOCS/Import+Export+Tools#ImportExportTools-mongorestore





On Aug 26, 2:22 pm, Ginny Hendry  wrote:
> Chris-
>
> Thanks.  That got me most of the way there but I needed to extract
> those four fields from the URL I connect with (in ENV['MONGOHQ_URL'])
> that looks like this:
>
> "mongodb://app123456:alongstr...@flame.mongohq.com:27078/app123456"
>
> This dump command seemed to work for me:
>
> mongodump  -hflame.mongohq.com:27078  -dapp123456  -uapp123456  -
> palongstring
>
> It created a dump subdirectory with what looks like my collections.
> Now how do I restore it to a local database?
>
> I tried several variations of this command
>
> mongorestore -hlocalhost:27017 -dapp123456
>
> and got:
>
> connected to: localhost:27017
> don't know what to do with [dump]
>
> so I'm not sure what mongorestore wants.  I am running mongod 1.6.1
> locally with default settings.
>
> Thanks.
>
>    -Ginny
>
> On Aug 26, 12:45 am, Chris Hanks 
> wrote:
>
>
>
> > Use the mongodump utility from the command line. It comes with
> > mongodb, and can be pointed at whatever remote database you like.
>
> > For example, try a ruby script that looks something like:
>
> > host = 'flame.mongohq.com:27000'
> > db   = 'ginnys-database'
> > user = 'ginny'
> > pass = 'password'
>
> > `mongodump -h#{host} -d#{db} -u#{user} -p#{pass} --out ~/dump`
>
> > That'll dump the entire contents to your local ~/dump folder. If you
> > need to restore them, you can use mongorestore, which takes similar
> > arguments.
>
> > On Aug 25, 9:44 pm, Ginny Hendry  wrote:
>
> > > Am I right in assuming that Heroku bundles don't include MongoHQ data?
>
> > > Do db:pull or taps work with MongoHQ?
>
> > > If not, what are our options for backup and restore for MongoHQ
> > > databases?
>
> > > I'm sure MongoHQ has backups in case their disks crash but I need my
> > > own backups in case I or a user destroys something important.
>
> > > Thx.
>
> > >   -Ginny

-- 
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: Backup for MongoHQ Data

2010-08-25 Thread Chris Hanks
Use the mongodump utility from the command line. It comes with
mongodb, and can be pointed at whatever remote database you like.

For example, try a ruby script that looks something like:

host = 'flame.mongohq.com:27000'
db   = 'ginnys-database'
user = 'ginny'
pass = 'password'

`mongodump -h#{host} -d#{db} -u#{user} -p#{pass} --out ~/dump`

That'll dump the entire contents to your local ~/dump folder. If you
need to restore them, you can use mongorestore, which takes similar
arguments.




On Aug 25, 9:44 pm, Ginny Hendry  wrote:
> Am I right in assuming that Heroku bundles don't include MongoHQ data?
>
> Do db:pull or taps work with MongoHQ?
>
> If not, what are our options for backup and restore for MongoHQ
> databases?
>
> I'm sure MongoHQ has backups in case their disks crash but I need my
> own backups in case I or a user destroys something important.
>
> Thx.
>
>   -Ginny

-- 
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: ANNOUNCEMENT: Upgrading to Bundler 1.0.0.rc.6

2010-08-25 Thread Chris Hanks
Hurrah!

Is there any word/ETA on Ruby 1.9.2?



On Aug 24, 4:16 pm, Terence Lee  wrote:
> Hello,
>
> Bundler 1.0.0.rc.6 was pushed out yesterday with some bug fixes.  You
> can view the complete changelog 
> here:http://github.com/carlhuda/bundler/blob/master/CHANGELOG.md The new
> Rails 3 RC2 also requires the newest version of bundler.  We're planning
> to rollout the new version of bundler Thursday afternoon.  Please be
> ready for the upgrade and remember to use staging apps before pushing
> code to production.
>
> Thanks,
> Terence

-- 
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.



db problems... relation "---" does not exist (ActiveRecord::StatementInvalid)

2010-08-25 Thread Chris Kimpton
Hi,

I have a starter app that I am trying to deploy to Heroku - it deploys and
db:migrates ok, or so it seems...

But when I try accessing the app, I get an ActiveRecord error, see below.

I can run it locally ok on sqlite and postgres (8.4), but Heroku does not
seem to like it.

Tried googling this group and generally, but only answers seem to relate to
forgetting to migrate - which I have done...

Thanks in advance for any clues/tips.
Chris


/home/slugs/271090_07ea067_eee5/mnt/.gems/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract_adapter.rb:221:in
`log': PGError: ERROR:  relation "---" does not exist
(ActiveRecord::StatementInvalid)
: 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 = '"---"'::regclass
   AND a.attnum > 0 AND NOT a.attisdropped
 ORDER BY a.attnum
from
/home/slugs/271090_07ea067_eee5/mnt/.gems/gems/activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb:507:in
`query'
from
/home/slugs/271090_07ea067_eee5/mnt/.gems/gems/activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1056:in
`column_definitions'
from
/home/slugs/271090_07ea067_eee5/mnt/.gems/gems/activerecord-2.3.8/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in
`columns'
from
/home/slugs/271090_07ea067_eee5/mnt/.gems/gems/activerecord-2.3.8/lib/active_record/base.rb:1301:in
`columns'
from
/disk1/home/slugs/271090_07ea067_eee5/mnt/vendor/plugins/active_scaffold/lib/active_scaffold/config/core.rb:112:in
`initialize'
from
/disk1/home/slugs/271090_07ea067_eee5/mnt/vendor/plugins/active_scaffold/lib/active_scaffold.rb:57:in
`new'

-- 
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.



  1   2   3   >