Re: Heroku does NOT compile files under assets pipelines in Rails 4

2014-01-08 Thread Keenan Brock
Hi john


Make sure your CSS file is included in your config/environments/production.rb




Look for a commented out section mentioning application stylesheets and java 
scripts. maybe precompile asset pipeline?




It bites people all the time and there are currently discussions on how to fix 
in rails. Ruby5 mentioned a gem recently.




Best of luck




Ping me if you can't find and I'll track down when I get to a computer.




Best of luck

Keenan

On Tue, Jan 7, 2014 at 9:02 PM, roror stelli...@gmail.com wrote:

 I've been reading stackoverflow for more than 4 hours now.  I can only get 
 application.js to compile on heroku.  This is a very simple, static webapp 
 I'm working on.  My *.css.scss files only have one obvious field to isolate 
 out compile-time failures.
 In my Gemfile and Gemfile.lock I have:
 group :production do
   gem 'rails_12factor'
 end
 In app/views/layouts/mycontroller.html.erb:
 I'm using
 head
   %= stylesheet_link_tag path/to/my.css %
   ...
 /head
 Everything works fine on my localhost, but I cannot get my css on heroku.
 http://stackoverflow.com/questions/15354539/heroku-does-not-compile-files-under-assets-piplines-in-rails-4
 http://stackoverflow.com/questions/20984600/cant-find-css-after-pushing-to-heroku
 http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
 -- 
 -- 
 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/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/groups/opt_out.


Re: x_sendfile_header

2013-02-21 Thread Keenan Brock
Hi,

I didn't think sendfile would work since nginx is running on different machines 
from the rails dynos.

I'm guessing this is still the case, but am unsure

http://stackoverflow.com/questions/2392371/rails-3-x-sendfile-on-heroku

Good luck,
--Keenan



On Thursday, February 21, 2013 at 6:10 PM, Espen Antonsen wrote:

 The reason why I am asking is that I see X-Accel-Mapping header missing in 
 my logs (everything works though).
 
 On Thursday, 21 February 2013 23:36:35 UTC+1, Espen Antonsen wrote:
  I have seen various recommendations for x_sendfile_header on Heroku. As 
  Heroku uses Nginx the natural choice would be 
  config.action_dispatch.x_sendfile_header = X-Accel-Redirect. But as 
  Heroku does not support rack sendfile that suggest 
  config.action_dispatch.x_sendfile_header = nil is the correct setting.
  
  Can any Heroku-staff clarify which setting should be used?
 
 -- 
 -- 
 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 
 (mailto: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 
 (mailto:heroku+unsubscr...@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/groups/opt_out.




12 factor application testing

2013-02-05 Thread Keenan Brock
Hi All, 

I have all my configuration values in environment variables.

But this seems to break down for running tests.
We only have 1 .env file that we source from .rvmrc.
So the same environment variables are used for both development and test (rails 
console and rake spec)


The solution for handling the 2 environments with one set of variables is 
currently to hack ENV['DATABASE_NAME'] in spec_helper and use code like this 
all over the place:
ENV['RABITMQ_URL'] + ENV['DATABASE_NAME']
Or to hardcore the test environment values in the yml files. and add 
Rails.env.test? int he ruby code.

As you'd imagine, this is starting to break down.


I assume the solution is to have 2 different environments, but I'm not sure how 
to do this.
Where would I load in the second environment file so I don't by mistake run 
rails console in the test environment or vice versa and blow away my 
environment.



How are other people handling the 2 different environments?


Thanks for any insight,
Keenan

-- 
-- 
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/groups/opt_out.




Re: Copying DB data from Heroku Postgresql to local server

2013-01-21 Thread Keenan Brock
I wonder if your functions will fail as well.

Will vacuum or statistics recompiles all the stored procedures and functions?
Google didn't show me any more information on this one.


I remember in Sybase, changing the statistics on a table too much used to reek 
havoc, slowing queries down by over 50x. Used to have to EXEC myProcedure WITH 
RECOMPILE to tell the query optimizer to use the latest statistics. Also used 
to rebuild the statistics every night. But I think this is already done by 
Postgres.

FWIW/
Keenan


On Monday, January 21, 2013 at 4:59 PM, Nickolay Kolev wrote:

 The crazy idea works! It was indeed because of prepared statements.
 
 I will look into why prepared statements do not work after a table is dropped 
 and recreated. Should be in postgresql_adapter.rb somewhere.
 
 Pulling the carpet under Rails' feet and putting it back exactly as it was 
 before (identical table names) should not cause prepared statements to fail, 
 unless they checksum the tables by something other than their names in some 
 way.
 
 Thanks a lot for the hint, Peter!
 
 On Monday, January 21, 2013 10:08:25 PM UTC+1, Peter van Hardenberg wrote:
  crazy idea: try disabling prepared statements.
  
  rationale: you might have prepared statements enabled, which is the 
  default, which would mean that instead of targeting the table by name it 
  would be compiled into an internal object ID which would change when you 
  run the restore since it drops and recreates the tables. 
  
  
  On Mon, Jan 21, 2013 at 1:06 PM, Peter van Hardenberg p...@heroku.com 
  (javascript:) wrote:
   pgbackups makes completely standard dumps, but you could use a local 
   pg_dump to prove equivalency. Doing a restore sounds like it's dropping 
   and recreating all the tables. Perhaps there's some kind of magic that 
   makes the migrations work which doesn't get triggered in your 
   dump/restore case. 
   
   
   On Mon, Jan 21, 2013 at 11:44 AM, Nickolay Kolev nmk...@gmail.com 
   (javascript:) wrote:
I don't think this is it. Even if there are no schema changes, the same 
behaviour can be observed. Actually Rails *will* pick up schema changes 
(e.g. as introduced by migrations) when running in development mode.

I have only seen this with Postgres and only when loading a dump. If 
true for all dumps or only the ones created by pgbackups I am not sure.
-- 
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 (javascript:)
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 group.
  
 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_US?hl=en

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


Re: How do you manage your production secrets (API key's etc.) without using source control?

2012-11-19 Thread Keenan Brock
Martin/others,

Chef has a registry service for stuff just like this. It is very powerful.

They show a capistrano script that doesn't know the target of the deploy. It 
simply asks for the app server list.

And having all these database passwords in the environment seems a little 
disconcerting.

Is this what ZooKeeper provides?
What else out there could Heroku use as a reference?

-Keenan 


On Monday, October 29, 2012 at 3:42 PM, Martin Wawrusch wrote:

 To chime in here a bit,
 
 what we and a lot of others I know of would really like to see is a separate, 
 distributed config store that securely stores and manages config variables, 
 with a nice admin api and a way to track changes and update servers in 
 real-time (socket.io (http://socket.io) comes to mind). It's definitely 
 something we would pay for. The only thing that would be stored in env vars 
 is some secret key to access the config store. 
 
 On Mon, Oct 29, 2012 at 12:39 PM, Keenan Brock kee...@thebrocks.net 
 (mailto:kee...@thebrocks.net) wrote:
  Hi Jay,
  
  I really like storing config vars in .env
  adding the file to gitignore and it doesn't go into the database
  
  If you didn't get enough from the heroku-config gem, there are more details 
  are in a heroku article:
  
  https://devcenter.heroku.com/articles/config-vars#using-foreman 
  
  Since foreman knows about the .env file (also written by David), locally it 
  is quite simple to use. And it acts as a recipe to remember what to publish.
  
  If you are using pow, you may need to add add source .env to your .powenv 
  
  you may want to check in a .env.sample file, much the same way you create a 
  database.sample.yml file.
  So it is quick for people to get up to speed, but the secrets are not 
  checked in.
  
  --Keenan
  
  On Monday, October 29, 2012 at 2:25 PM, Jay Vyas wrote:
  
   It would be nice if heroku gave us a bootstrap script that could be 
   uploaded and downloaded, that came with default templates and commands 
   that we could toggle (like setting env variables and stuff).  Does 
   anything like this exist already?  Such a paradigm would be great for 
   adding API keys and stuff as env variables .
   -- 
   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 
   (mailto: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 group.
   
  To unsubscribe from this group, send email to
  heroku+unsubscr...@googlegroups.com 
  (mailto:heroku%2bunsubscr...@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 group.
  
 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_US?hl=en

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


Re: How do you manage your production secrets (API key's etc.) without using source control?

2012-10-29 Thread Keenan Brock
Hi Jay,

I really like storing config vars in .env
adding the file to gitignore and it doesn't go into the database

If you didn't get enough from the heroku-config gem, there are more details are 
in a heroku article:

https://devcenter.heroku.com/articles/config-vars#using-foreman

Since foreman knows about the .env file (also written by David), locally it is 
quite simple to use. And it acts as a recipe to remember what to publish.

If you are using pow, you may need to add add source .env to your .powenv

you may want to check in a .env.sample file, much the same way you create a 
database.sample.yml file.
So it is quick for people to get up to speed, but the secrets are not checked 
in.

--Keenan 


On Monday, October 29, 2012 at 2:25 PM, Jay Vyas wrote:

 It would be nice if heroku gave us a bootstrap script that could be 
 uploaded and downloaded, that came with default templates and commands that 
 we could toggle (like setting env variables and stuff).  Does anything like 
 this exist already?  Such a paradigm would be great for adding API keys and 
 stuff as env variables .
 -- 
 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 
 (mailto: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 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


Re: Background Jobs For Mission Critical Info

2012-09-27 Thread Keenan Brock
Hi Carson,

You may also want to look at https://github.com/ryandotsmith/queue_classic
Ryan is also at Heroku. And designed this with the heroku infrastructure in 
mind.

I have not used queue classic, but have had good experience with DJ and Resque. 
(not a big fan of backgroundrb)

--Keenan


On Thursday, September 27, 2012 at 11:55 AM, Richard Schneeman wrote:

 The maintainer of Resque (Terence Lee (http://twitter.com/hone02)) works for 
 Heroku. Failed Resque jobs can be retried via the built in web interface. 
 I've never had a bad experience with Delayed Job, but if you are using it 
 heavily it can impact your database performance. 
 
 -- 
 Richard Schneeman
 http://heroku.com
 
 @schneems (http://twitter.com/schneems)
 
 
 
 
 On Wednesday, September 26, 2012 at 9:21 PM, Carson Gross wrote:
 
  Hi,
  
  I've got a bit of processing that is not time critical but that is mission 
  critical, and I'm considering running as a Delayed Job in order to minimize 
  request times.  My experience with Delayed Jobs on bamboo was that there 
  were times when the queue just hung, and I had to delete the jobs to get 
  things running again.  I won't be able to just drop these jobs on the floor 
  like I could on our bamboo app, so I was wondering if anyone can comment on 
  the reliability of DJ's on the cedar stack, if they've had problems w/ 
  things hanging, etc.
  
  Thanks for any comments or opinions,
  Carson
  
  -- 
  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 
  (mailto: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 group.
  
 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_US?hl=en

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


Re: Error/maintenance pages request -- iframe document.domain

2012-05-29 Thread Keenan Brock
Hi Aseem,

You should probably send the request to Heroku's support.
Since you are asking them to do something.


This list is more of a community support effort, and less of a Heroku please do 
things.

That sounds like a great feature

Best of luck,
Keenan



On Monday, May 28, 2012 at 10:18 PM, Aseem Kishore wrote:

 The custom error and maintenance pages are served by Heroku using an iframe. 
 The actual returned document looks like this:
 
 html
 head
   meta http-equiv=content-type content=text/html; charset=ISO-8859-1
   style type=text/css
 html, body, iframe { margin: 0; padding: 0; height: 100%; }
 iframe { display: block; width: 100%; border: none; }
   /style
 titleOffline for Maintenance/title/head
 /head
 body
   iframe src=http://example.com/path/to/maintenance.html;
 pApplication Error/p
   /iframe
 /body
 /html
 
 
 Within my error page, I'd love to know what the actual URL in the browser is 
 for a user-help feature. But I can only do that if both frames agree on the 
 document.domain (https://developer.mozilla.org/en/DOM/document.domain). 
 
 I can do this within my page, but the HTML returned by Heroku is out of my 
 control. Thus, I'm emailing to request if Heroku could add one line of 
 JavaScript to this returned HTML:
 
 document.domain = example.com (http://example.com);
 
 Where example.com (http://example.com) is the TLD of the current URL. So 
 e.g. if I'm at www.foo.com (http://www.foo.com), it'd be foo.com 
 (http://foo.com), and if I'm at my.custom.url.com 
 (http://my.custom.url.com), it'd be url.com (http://url.com). 
 
 Hope this is feasible! Thanks for the consideration. =)
 
 Aseem
 
 
 -- 
 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 
 (mailto: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 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


Re: permission denied when trying to run heroku commands

2012-05-15 Thread Keenan Brock
hi,

a. may want to check the first line of manage.py
ensure it doesn't hardcode the location of python
#!/usr/bin/env python

b. also make sure it is executable
chmod 755 fastparqsite/manage.py
(and commit it)

c. add python to the command?
heroku run python fastparqsite/manage.py


Just a few ideas

Good luck 


On Tuesday, May 15, 2012 at 7:27 AM, psychok7 wrote:

 hi there, up until yesterday everything seemed to work fine, but today i did 
 a commit and when i try to run heroku run fastparqsite/manage.py shell  i 
 get a :
 
  sh: fastparqsite/manage.py: Permission denied
 
 how can i fix this?? i can still push to my heroku without any problems 
 
 -- 
 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 
 (mailto: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 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


Re: permission denied when trying to run heroku commands

2012-05-15 Thread Keenan Brock
Hi,

Not sure if I understand what you are asking.

I assumed this was source code that you checked into git.
And you want to run your script.

I also assume that while web users may upload files to a temp directory or 
something, the are not be able to modify any of your website code.


Are you running code that any random person uploaded to your site?
That would be a very bad security risk.

The vast majority of the time you would be trying to prevent users from writing 
to any of your scripts.

—Keenan  


On Tuesday, May 15, 2012 at 10:14 AM, psychok7 wrote:

 thanks, chmod 755 fastparqsite/manage.py fixed my problem
  
 but wont this be a security issue if i am allowing anyuser to write to my 
 file?
  
 On Tuesday, May 15, 2012 2:08:21 PM UTC+1, Keenan wrote:
  hi,
   
  a. may want to check the first line of manage.py
  ensure it doesn't hardcode the location of python
  #!/usr/bin/env python
   
  b. also make sure it is executable
  chmod 755 fastparqsite/manage.py
  (and commit it)
   
  c. add python to the command?
  heroku run python fastparqsite/manage.py
   
   
  Just a few ideas
   
  Good luck  
   
  On Tuesday, May 15, 2012 at 7:27 AM, psychok7 wrote:
   
   hi there, up until yesterday everything seemed to work fine, but today i 
   did a commit and when i try to run heroku run fastparqsite/manage.py 
   shell  i get a :

sh: fastparqsite/manage.py: Permission denied

   how can i fix this?? i can still push to my heroku without any problems  

   --  
   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 
   (mailto: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 group.
   
 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_US?hl=en

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


Deploying to Cedar

2012-04-11 Thread Keenan Brock
Hi all, 

Is anyone able to deploy to cedar?

I'm on a mac Lion, 1.9.2, rails 3.2.3

Last night it was giving me grief on my Gemfile being modified and that I 
needed to bundle install to update Gemfile.lock.

Today, it is saying it can not find the rake gem.


I even dropped my app and recreated it. Of course since I can't deploy, it 
isn't yet created yet.


$ git push heroku master
Counting objects: 540, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (248/248), done.
Writing objects: 100% (540/540), 90.72 KiB, done.
Total 540 (delta 294), reused 477 (delta 255)

- Heroku receiving push
- Ruby/Rails app detected
- Installing dependencies using Bundler version 1.1.2
   Running: bundle install --without development:test --path vendor/bundle 
--binstubs bin/ --deployment
   Some gems seem to be missing from your vendor/cache directory.
   Could not find rake-0.9.2.2 in any of the sources
 !
 ! Failed to install gems via Bundler.
 !
 ! Heroku push rejected, failed to compile Ruby/rails app

To g...@heroku.com:farm.git
 ! [remote rejected] master - master (pre-receive hook declined)
error: failed to push some refs to 'g...@heroku.com:farm.git'



$ git ls-files vendor/cache/rake-0.9.2.2.gem
vendor/cache/rake-0.9.2.2.gem




A simple, works for me would be great.

Thanks,
Keenan

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



Re: Deploying to Cedar

2012-04-11 Thread Keenan Brock
Thank you Ed,

So it is probably because i put gems into vendor/cache.

It gets my app into a weird state.

Even if I change the Gemfile and Gemfile.lock to point to rake 0.9.2, it still 
complains about 0.9.2.2 not being referenced correctly.

Looks like a bundle —deployment gone bad.


I'll hack on this some more tonight.

—Keenan  


On Wednesday, April 11, 2012 at 9:49 AM, Ed Jones wrote:

 Sorry: No gems in my vendor directory.
  
  
 On Apr 11, 9:48 am, Ed Jones ed.jo...@gmail.com (http://gmail.com) wrote:
  And no gems in my gem directory
   
  On Apr 11, 9:44 am, Ed Jones ed.jo...@gmail.com (http://gmail.com) wrote:
   
   
   
   
   
   
   
   Yes, I just pushed a 3.2.2 app. However, it just said Using rake
   (0.9.2.2), so if your issue is installing rake, this may not prove
   anything.

   
   
   On Apr 11, 9:19 am, Keenan Brock kee...@thebrocks.net 
   (http://thebrocks.net) wrote:
   
Hi all,
   
Is anyone able to deploy to cedar?
   
I'm on a mac Lion, 1.9.2, rails 3.2.3
   
Last night it was giving me grief on my Gemfile being modified and that 
I needed to bundle install to update Gemfile.lock.
   
Today, it is saying it can not find the rake gem.
   
I even dropped my app and recreated it. Of course since I can't deploy, 
it isn't yet created yet.
   
$ git push heroku master
Counting objects: 540, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (248/248), done.
Writing objects: 100% (540/540), 90.72 KiB, done.
Total 540 (delta 294), reused 477 (delta 255)
 

   
   
- Heroku receiving push
- Ruby/Rails app detected
- Installing dependencies using Bundler version 1.1.2
   Running: bundle install --without development:test --path 
vendor/bundle --binstubs bin/ --deployment
   Some gems seem to be missing from your vendor/cache directory.
   Could not find rake-0.9.2.2 in any of the sources
 !
 ! Failed to install gems via Bundler.
 !
 ! Heroku push rejected, failed to compile Ruby/rails app
 

   
   
To g...@heroku.com (http://heroku.com):farm.git
 ! [remote rejected] master - master (pre-receive hook declined)
error: failed to push some refs to '...@heroku.com 
(http://heroku.com):farm.git'
 

   
   
$ git ls-files vendor/cache/rake-0.9.2.2.gem
vendor/cache/rake-0.9.2.2.gem
 

   
   
A simple, works for me would be great.
   
Thanks,
Keenan
 

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



Re: Gem Manifest deprecation

2012-04-06 Thread Keenan Brock
Hello Michel,

I think this is a great example of heroku being ahead of their time.

When .gems was introduced, there wasn't a way to specify gem dependencies in a 
ruby project.
Back then, dependencies were a mess - heroku even had to run their own custom 
fork of rails.


Now, the Gemfile is a common and standard way of specifying dependencies.
There is a whole community adding features and documenting implications and 
nuances.


It makes sense for heroku to drop their proprietary tool and go with the common 
one, no?
That way they can dedicate their resources on other great stuff to give to us.

just my take,
Keenan



On Thursday, April 5, 2012 at 12:50 PM, Michel Martens wrote:

 Hello, what's the reason for deprecating the .gems manifest in favor
 of Bundler's Gemfile?
 
 -- 
 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.



Re: Scalability of Heroku worker job with external network connection

2012-04-02 Thread Keenan Brock
Hello Gkr,

Yes, a bunch of clients can all connecting to the same server (target ip/port) 
at the same time.
This is how the web works. (a bunch of browsers all connect to the web server 
running on heroku.com (http://heroku.com) port 80)


Some websites / services were written in a way that prevents you from having 
multiple clients at the same time. This is an exception and not the rule, but 
you may want to ask the service provider.

If it is a restful web service, then you can probably assume yes.

—Keenan  


On Wednesday, March 28, 2012 at 10:30 AM, gkr wrote:

 Thanks Keenan,
  
 I am using Delayed Job. But code that connects to external server from
 different worker process may connect to same server IP/Port at the
 same time due to they are running in parallel, is that work without
 problem ?
  
  
 On Mar 28, 6:22 pm, Keenan Brock kee...@thebrocks.net 
 (http://thebrocks.net) wrote:
  Hello Gkr,
   
  Yes, multiple workers can run at the same time.
  People like delayed job and resque, though I'm sure there are other options 
  out there as well.
   
  The processes can access external ports. You may have to have a paid 
  account for that (credit card on file).
   
  One thing to keep in mind, this is running on ec2.
  So most of the ip addresses are in spam black lists for smtp. Don't think 
  pop has the same constraint.
  So if you are sending out email use send grid, amazon's simple mail 
  service, or another.
   
  —Keenan
   
   
   
   
   
   
   
  On Wednesday, March 28, 2012 at 2:37 AM, gkr wrote:
   Hi,
   
   
   Is it allowed to make network connection to external server (ex.pop3)
   from worker job(Rails3 app) ?

   
   
   If yes can the job run in parallel because adding more worker will
   which I guess make the jobs to connect to same server IP/Port from
   different worker, Is that make connection conflicts ?

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



How do others deal with cedar rails 3.2 and asset pipelines?

2012-03-31 Thread Keenan Brock
Hi All, 

I'm running rails 3.2 on cedar.

heroku config |grep BUNDLE
BUNDLE_WITHOUT  = development:test:assets


Gemfile (the asset part at least)
group :assets do
  gem 'sass-rails',   '~ 3.2.3'
  gem 'coffee-rails', '~ 3.2.1'

  gem 'uglifier', '= 1.0.3'
  gem bootstrap-sass, '~ 2.0.1'
  gem 'jquery-rails', '~ 2.0.1'
end


When I want to deploy I run:

rake assets:clear
rake assets:precompile

git add public/assets
and git commit -m 'new assets'
git commit heroku master


Unfortunately, heroku does not respect my BUNDLE_WITHOUT
This seems like a waste.

And if I went with a cdn, I'd still not need these gems in production.


How do other people handle assets?
Am I wrong to think I don't need these gems while running in production?
Are these extra dozen or so gems going to make my slug size/compilation time 
decrease? or am I optimizing the wrong thing? 


Thanks for any pointers,
Keenan

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



Re: Scalability of Heroku worker job with external network connection

2012-03-28 Thread Keenan Brock
Hello Gkr,

Yes, multiple workers can run at the same time.
People like delayed job and resque, though I'm sure there are other options out 
there as well.


The processes can access external ports. You may have to have a paid account 
for that (credit card on file).

One thing to keep in mind, this is running on ec2.
So most of the ip addresses are in spam black lists for smtp. Don't think pop 
has the same constraint.
So if you are sending out email use send grid, amazon's simple mail service, or 
another.

—Keenan   


On Wednesday, March 28, 2012 at 2:37 AM, gkr wrote:

 Hi,
  
 Is it allowed to make network connection to external server (ex.pop3)
 from worker job(Rails3 app) ?
  
 If yes can the job run in parallel because adding more worker will
 which I guess make the jobs to connect to same server IP/Port from
 different worker, Is that make connection conflicts ?
  
 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.



Re: Web Dyno Unresponsive for 10 minutes after deploy/restart

2012-03-21 Thread Keenan Brock
I tend to jump to the conclusion that it is a disk access issue.

It can be paperclip, imagemagick, sass, asset bundling, and stuff like that 
that may be misconfigured to write to the local filesystem.

Locally I:

rm -rf tmp/*
chmod -R a+w tmp
sudo su another_user
./rails s

(you may have to tweak your parent directories above your source directory to 
at least be world executable. At least for the time being.


then I launch chrome and watch things fail. Or I tweak the permissions and find 
out what I did wrong.



Not sure if this is enough information for you to run with
It could also be a services configuration error. e.g.: you are hooking up to a 
localhost redis/memcached.

try tweaking those values and ensure your local setup fails on those setups.

And if you do asset stuff on heroku, make sure you have a javascript gem that 
will work in heroku. The mac has a javascript environment that is loaded by 
default.


Best of luck. 


On Wednesday, March 21, 2012 at 2:59 PM, Joe Kueser wrote:

 I'm stumped, so I throw this out there in hopes that someone has experienced 
 something similar.
 
 I have a fairly large app (uses Spree models to serve up about 1,200 
 products, but custom views.) The app runs like a champ locally, up and 
 responsive within a second or two since upgrading to Rails 3.2. Switching to 
 production on my local box makes it even faster. Never have to wait.
 
 On Heroku, however, it's a different story. I deploy, the dynos start up as 
 expected, but I get good ol' Error H12 (Request timeout) for about 5 to 10 
 minutes. I have 2 dynos spinning up, and one will become responsive at that 5 
 minute mark, and the other will continue to timeout. After 10 minutes, 
 everything seems fine.
 
 This happens every time a dyno restarts too. So if the dyno chokes and Heroku 
 is kind enough to restart it for me, the site will timeout on all requests 
 hitting that dyno for 5 to 10 minutes.
 
 I have hooked up NewRelic to see if I can see anything weird going on, and 
 whatever request comes in just hangs. There is no SQL being executed, there 
 are no infinite loops. Just the stinkin' timeout.
 
 The only code that is common to all pages builds my navigation based on my 
 Spree::Taxon hierarchy. So maybe my next step is just to make that static 
 since it's not likely to change any time soon. Other than that, I'm stumped.
 
 If it matters, I'm using Thin to serve up the pages, and saw the same 
 behavior with Webrick. Considering trying Unicorn, but it doesn't feel like 
 the server is the problem.
 
 Any ideas? Have you seen anything similar? Any tips for finding where things 
 are actually hanging?
 
 Thanks in advance.
 
 Joe 
 
 -- 
 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/-/1rnFqaMNssMJ.
 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.



Re: Sanity check: pg follow - alter column

2012-03-14 Thread Keenan Brock
Hi Carson,

Adding a column is quick  
Renaming a column is quick too.
Updating… not so much.

I would

1. create/run a migration that adds the column.
do not add any indexes on the column yet

2. update the columns:
start_id = connection.select_value select min(id) from big_table where new_col 
is null #or 0 if you set not null/default to 0
end_id = connection.select_value select max(id) from big_table

BATCH_SIZE=1
while start_id  end_id
  connection.execute update big_table set new_col = old_col where id = 
#{start_id} and id  #{start_id + BATCH_SIZE}
  start_id += BATCH_SIZE
end

3. drop the old column and rename the new column to the name of the old column.
add indexes/foreign keys
this migration will require a rails restart


Play around with the batch size.

There will be a sweet spot. doubling the number of rows will only increase the 
time by a few seconds. Then all of a sudden it will take longer.

Also, while you are playing with batch size, keep increasing the start_id. so 
you are getting the work done while you are playing/experimenting.

Time the execution to give you an idea of just how long it will take to update 
every row.  
—Keenan


On Wednesday, March 14, 2012 at 4:57 AM, Peter van Hardenberg wrote:

 Hi Carson,
  
 Unfortunately, followers are exact replicas of the master database and do not 
 support having changes made to them, so unfortunately your proposed plan 
 won't work.
  
 That said, if the on-disk storage type is compatible, it should be basically 
 instantaneous. Try it on a follower and see if it happens instantly. 
 Otherwise, I recommend you create the new column and migrate the data with a 
 worker process gradually. Gigantic transactions can cause pain for running 
 databases due to a large number of non-visible rows polluting things like 
 indices. Someone else may have more specific advice for your case.  
  
 Let us know what you discover,
 -pvh
  
 On Tue, Mar 13, 2012 at 9:11 PM, Carson Gross carsongr...@gmail.com 
 (mailto:carsongr...@gmail.com) wrote:
  Hi Guys,
   
  So, we've got ourselves into a bit of a pickle, and have an integer
  column in a (100 million plus rows) table that really needs to be
  bigint.  Not this year, but certainly before we die.  I'd like to make
  the change sooner rather than later, and I *think* that heroku is
  gonna save our bacon here if the following technique could work:
   
  * Create a database that follows our current db
  * In the follower run 'ALTER TABLE my_table ALTER COLUMN id TYPE
  bigint'
  * Wait a long time
  * Wait for the follower to catch up  (I assume that given that we are
  widening the datatype the follower will work again after the upgrade)
  * Move the app over to the new db.
   
  Does this sound plausible?
   
  Thanks,
  Carson
   
  --
  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%2bunsubscr...@googlegroups.com).
  For more options, visit this group at 
  http://groups.google.com/group/heroku?hl=en.
   
  
 --  
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to 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.



Re: Find out the name of the app I'm running on?

2012-03-14 Thread Keenan Brock
Hi V,

to see all your apps:

heroku list

to see your remote repository:

git remote -v

if you look at the heroku (or origin), you'll probably see your app name right 
before the .git


—Keenan


On Wednesday, March 14, 2012 at 2:42 AM, vierundsech...@googlemail.com wrote:

 This appears to be so simple that I feel a little dumb to ask it: Is there a 
 way to find out the name of the app? I'm currently using an 
 enviroment-variable that I set manually with heroku config:add 
 APP_NAME=my_awesome_app - but I guess there should be a better way?!  
  
 --  
 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/-/CAhUXCZbAcQJ.
 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.



Re: Allow top-level domains to point to a vanity subdomain?

2012-02-20 Thread Keenan Brock
Hi Martin,

There are 2 things.

1. The browser needs to resolve the domain name to heroku's servers.
You tell DNS to point a.app.com (http://a.app.com) or example.com 
(http://example.com) to the right app server [app.heroku.com 
(http://app.heroku.com)].
The CNAME record does this.
You can tell DNS to point all *.app.com to point to heroku.com.


2. The app server at Heroku needs to route the request to the right Application.
The heroku.add_domain example does this.
Or if you have a simple app, the web configuration does this.

If you use a wild card domain (heroku wild card), then it is easy to say 
*.app.com (http://app.com) all point to your code base.

If you do not/can not wild card the domains, then you will need to add every 
entry to link to your app.
So if you are adding another domain, e.g.: example.com (http://example.com), 
you'll probably need to add this via the command line.

Did that help?

—Keenan  

On Sunday, February 19, 2012 at 2:04 PM, Martin Streicher wrote:

 I have a Rails 3.2 app on Heroku.
  
 It accepts wildcards and subdomains, so each user can have a vanity
 subdomain, such as a.app.com (http://a.app.com), b.app.com 
 (http://b.app.com), etc.
  
 What I want to do is let a user point example.com (http://example.com) to 
 a.app.com (http://a.app.com).
  
 What would I have to change in the example.com (http://example.com) DNS 
 config to make this
 work? And what do I change in my app?
  
 I am guessing example.com (http://example.com) is just a CNAME for a.app.com 
 (http://a.app.com). But how does
 my app know what to do -- it needs to know that example.com 
 (http://example.com) is really
 a.app.com (http://a.app.com). I suppose I could tell the app that -- the user 
 could
 configure it.
  
 Just trying to figure out the proxy madness for this... since
 a.app.com (http://a.app.com) is a proxy to app.heroku.com 
 (http://app.heroku.com). Does example.com (http://example.com) have to be a
 proxy to app.heroku.com (http://app.heroku.com)? I am guessing that wont work.
  
 Any ideas would be awesome.
  
 --  
 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.



Re: The remote end of my app is hung up.

2011-11-15 Thread Keenan Brock
it looks like you have not linked the remote server heroku to your git repo

There are 2 common setups.

1) linked to github

remote origin = github
remote heroku = heroku

2) linked to heroku
remote origin = heroku

do a git remote -v

I'm guessing you are using setup #2

git push origin master

If not, then you'll need to add heroku's remote

git add remote heroku g...@heroku.com:app name.git


Does that solve your problem? 


On Friday, November 11, 2011 at 4:28 PM, Pearsword wrote:

 I am a beginner of Face Book and so know Heroku little.
 So I cannot understand a little about them,but I want to achieve my
 work,please teach me to matters to solve the problem.
 
 I make a Face Book app on Windows Vista,and can do heroku login.
 But I cannot deploy my app on Heroku.
 I have rsa keys.Sometimes struggling with my app,the pair of keys
 increase to 4.
 
 Commanding git push heroku master is not working with an error as
 the following.
 fatal:heroku does no appear to be a git repository.and
 fata]:The remote end hung up unexpectedly.
 
 Are there a good way to solve this problem?
 
 -- 
 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.



Re: Running out of memory with RMagick on Bamboo

2011-09-27 Thread Keenan Brock
Hi dB,

I've had a ton of success avoiding rmagick all together and using the command 
line version for processing images.

Specifically: cropping and merging multiple images together adding color 
gradients.

I think you can also rotate and add text fairly easily.


You may be able to steal some ideas from:

https://github.com/kbrock/monster-avatars

—Keenan  


On Tuesday, September 27, 2011 at 1:19 AM, dblock wrote:

 I am trying to process larger and larger images on Heroku and starting
 to run into memory limits with RMagick. A 10MB 300dpi image may be
 400MB in RAM after being loaded with RMagick, so it easily breaks the
 Heroku's 300MB limit on Bamboo.
  
 Anyone has any experience with a similar situation?
  
 Thx
 dB.
  
 --  
 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.



Re: Resque vs Appoxy SimpleWorker

2011-08-29 Thread Keenan Brock
Hi Stephen,

Using Resque and Sendgrid (running locally / not on heroku) with 4 resque 
workers, we are able to completely mail out 30K emails within an hour or two.

It took practically no time to enqueue.
I may be remembering this incorrectly, as luckily we don't send out slews of 
emails every night.


Article.all.each loads everything into memory. You may want to try find_each / 
find_in_batches or a pure sql route. (There are ways to do this in rails 2 and 
rails 3)

Good Luck,
Keenan



On Sunday, August 28, 2011 at 5:01 AM, Stephen Cremin wrote:

 I created another rake task that pushed jobs onto Resque, and indeed it did 
 push thousands of jobs onto the queue and let me ramp through them by 
 increasing the number of workers. Perhaps I was hit by the recent worker bug 
 outlined on Heroku's status page. If nobody else has direct experience with 
 Sendgrid on Resque vs Appoxy, I'll do my own experiment and report back what 
 kind of throughput I can get.
 
 Stephen
 
 
 On 28 August 2011 08:50, Gabriel ummo...@gmail.com 
 (mailto:ummo...@gmail.com) wrote:
   On a weekly basis I load 5 - 600 jobs into a DelayedJob queue in
   seconds so I think something else is going on here. Maybe it's
   ActiveRecord taking a while to load a bunch of objects?
  
   On Aug 26, 6:10 pm, Stephen Cremin asianf...@gmail.com 
  (mailto:asianf...@gmail.com) wrote:
   I recently introuduced Resque to my application and I've started moving
   background tasks into queues. In day-to-day use, I use an :after_save hook
   to index articles in the background, but I also have a rake task:
  
   ===
   desc Indexing articles
  
   task :index_articles = :environment do
begin
Article.all.each { |a| Resque.enqueue(IndexArticle, a.id (http://a.id), 
   a.main_text :
   a.raw_main_text), a.class.name (http://a.class.name), 
   a.publish_date.to_i) }
end
   end
   ===
  
   When I ran this, I expected to see a couple of thousand articles appear
   almost instantly on the relevant queue on Resque, and be able to increase
   the number of workers to speed through them. Instead, I never see more 
   than
   5-10 at a time on the queue, and the rake task takes quite some time to 
   run.
  
   I have 20,000 subscribers on a mailing list that currently takes 2-3 hours
   to send via SendGrid in a rake task. I was hoping that queuing these up on
   Resque would allow me to send them in minutes rather than hours with 
   enough
   workers, but I'm guessing now that's not the case.
  
   Would Appoxy Simpleworker let me fire off 20,000 email jobs in a queue, 
   that
   could be sent off in minutes rather than hours? Or would Resque handle 
   this
   and I just haven't configured it properly. Or is it something inherent in
   rake that is slowing batch jobs down in general.
  
   Although, it's not essential that the email goes out in minutes, those 
   hours
   waiting for the emails to go out are incredibly stressful since the 
   mailing
   list will sometimes break.
  
   Stephen
  
   PS:I noticed that SendGrid can now manage newsletter delivery for you, 
   and I
   may explore that option.
  
  --
   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%2bunsubscr...@googlegroups.com).
   For more options, visit this group at 
  http://groups.google.com/group/heroku?hl=en.
  
 
  -- 
  You received this message because you are subscribed to the Google Groups 
 Heroku group.
  To post to this group, send email to 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.



Re: Is it possible to `git push` heroku config:add or just not restart the app?

2011-08-07 Thread Keenan Brock
Hi

You can get some ideas by going into heroku console and typing `env`

--Keenan 

On Sunday, August 7, 2011 at 1:34 AM, kowsik wrote:

 It's the same as 'git rev-parse --short HEAD'. AFAIK, it's not
 documented anywhere, found it just out of curiosity on what ENV's
 heroku sets for the app.
 
 Someone from Heroku has to confirm this. Like I said, just happened to
 noticed this, but it seems to correlate with running 'git rev-parse
 --short HEAD' against my repo after each push.
 
 YMMV,
 
 K.
 ---
 http://blitz.io
 @pcapr
 
 On Sat, Aug 6, 2011 at 6:54 PM, dblock dblockdot...@gmail.com 
 (mailto:dblockdot...@gmail.com) wrote:
  For some reason I thought that was different ...
  
  Is this documented somewhere on Heroku?
  
  Forgive my ignorance, is it just the first 7 digits of the commit
  hash? Why 7?
  
  Also, I found this thread 
  http://groups.google.com/group/heroku/browse_thread/thread/35886af3ee8a87f6
  that wasn't answered and looks worrisome - is this guaranteed to be
  what has been pushed?
  
  Thx
  dB.
  
  On Aug 5, 4:46 pm, kowsik kow...@gmail.com (http://gmail.com) wrote:
   If you do
   
   $ heroku console 'ENV'
   
   on your app, you'll notice that all heroku apps already have a
   COMMIT_HASH environment variable that's the last git push/commit
   revision. You can simply use this instead of defining your own config
   variable.
   
   K.
   ---http://blitz.io
   @pcapr
   
   
   
   
   
   
   
   On Fri, Aug 5, 2011 at 1:37 PM, dblock dblockdot...@gmail.com 
   (http://gmail.com) wrote:
We use a CDN for our content. Every new push to heroku changes the
value of ASSETS_HASH to the git-revision of the latest change. Then
the system reads that value to make URLs.
   
I don't want to commit a file that contains ASSETS_HASH because that
becomes a chicken-egg problem (a hash that represents the ... previous
commit, umh...), I am super happy with our heroku config:add
ASSETS_HASH=... . But that restarts the server, after which I am
pushing the new code, maybe 30 seconds later.
   
Is it possible to combine those two? I see two options.
   
- git push heroku master +++config:add ASSETS_HASH=...
- heroku config:add ASSETS_HASH=... --norestart ; git push heroku
master
   
Ideas?
   
Thx
dB.
   
--
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 
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 
  (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 
 (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.



Re: Anyone having trouble using heroku console?

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

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

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

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

Thank again,
Keenan

On Jul 14, 2011, at 5:48 PM, Francois fhar...@gmail.com wrote:

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

 - F

 On Jul 14, 10:53 am, Terence Lee tere...@heroku.com wrote:
 Hello Keenan,

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

 Best,
 Terence



 On Wed, Jul 13, 2011 at 9:06 AM, Keenan Brock kee...@thebrocks.net wrote:
  Hi,

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

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

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

 But from heroku console:

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

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

 * heroku rake db:migrate*

 (in /app)
 rake aborted!
 uninitialized constant Rake::DSL
 /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
 /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in
 `class:TaskLib'
 /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in
 `module:Rake'
 /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `top
 (required)'
 /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
 /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `top
 (required)'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
 ion.rake:2:in
 `require'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentat 
 ion.rake:2:in
 `top (required)'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
 `load'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in
 `block in top (required)'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
 `each'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in
 `top (required)'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
 15:in
 `require'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:2 
 15:in
 `initialize_tasks'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:1 
 39:in
 `load_tasks'
 /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:7 
 7:in
 `method_missing'
 /app/Rakefile:7:in `top (required)'
 /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 `main'

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

 --Keenan

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

 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to heroku@googlegroups.com

Anyone having trouble using heroku console?

2011-07-13 Thread Keenan Brock
Hi,

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

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

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

But from heroku console:

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

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


 heroku rake db:migrate

(in /app)
rake aborted!
uninitialized constant Rake::DSL
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in 
`class:TaskLib'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in 
`module:Rake'
/app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in `top 
(required)'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `require'
/app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.8/lib/rdoc/task.rb:37:in `top 
(required)'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
 `require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/documentation.rake:2:in
 `top (required)'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:15:in 
`block in top (required)'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb:6:in `top 
(required)'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
 `require'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:215:in
 `initialize_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:139:in
 `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/application.rb:77:in 
`method_missing'
/app/Rakefile:7:in `top (required)'
/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 `main'


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

--Keenan 

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



Re: PostgreSQL contrib modules in dedicated database

2011-06-21 Thread Keenan Brock
fwiw/

hstore has gotten a lot of press lately. At railsconf, some heroku people told 
me about it, and Aaron Patterson mentioned it in his key note. 
--Keenan


On Monday, June 20, 2011 at 4:08 PM, Peter van Hardenberg wrote:

 Unfortunately contrib modules are difficult to support on our databases today 
 due to their namespace polluting nature and the requirement for installing 
 them as superuser. I'm afraid there isn't really a good work-around, but 
 we're optimistic that the new extension support in PG 9.1 will help us make 
 this possible. In the mean time, if you'd like to contact me off-list, I'd 
 love to understand better what you're doing and why you want both of those 
 modules. It certainly helps us prioritize the work when we see demand.
 
 -p
 
 On Sun, Jun 19, 2011 at 11:40 PM, wtn wtnel...@gmail.com 
 (mailto:wtnel...@gmail.com) wrote:
   Heroku support has previously said that Unfortunately we are not
   installing any custom Postgres modules now as they tend to be resource
   intensive and a bad match for a shared database solution. (I found
   that quotation on an issues ticket discussion on Github.)
  
   I am wondering if Heroku will grant such requests for dedicated
   databases. I need hstore and trigram support.
  
   --
   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%2bunsubscr...@googlegroups.com).
   For more options, visit this group at 
  http://groups.google.com/group/heroku?hl=en.
  
 
  -- 
  You received this message because you are subscribed to the Google Groups 
 Heroku group.
  To post to this group, send email to 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.



Re: varnish not caching?

2011-06-01 Thread Keenan Brock
Hi craayzie person,

You may want to take a look at http://redbot.org/

It tends to give some good pointers to debugging cache headers.

You may also want to implement some server side behavior to leverage the ETag

Also check out 
http://railslab.newrelic.com/2009/02/26/episode-11-advanced-http-caching

There are lots of great articles there, but that one in particular may shed 
some light.

--Keenan


On Tuesday, May 31, 2011 at 8: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 
 (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.



Re: Git commands within app

2011-05-11 Thread Keenan Brock
Hi Clément,

I did notice the environment variable:
ENV[LAST_GIT_BY]

But nothing is stopping you from populating the sha into a config variable upon 
deploy.


On our staging servers we go so far as to display our git information in a 
status bar. 



I remember heroku having something like this once upon a time. But that may 
have been in the heroku 1.0 timeframe.

--Keenan

On Wednesday, May 11, 2011 at 7:24 AM, Clément wrote: 
 Indeed heroku console is a nice friend, thanks for the noticing git
 binaries :)
 
 But running on a dyno, app is extracted from its repo (thanks Oren)
 
 I'm sometimes using a simple heroku-lovely-git-pure workflow (so no
 deploy task).
 
 I would love add locally a post-commit hook on git which would set an
 env variable.
 Once deployed my app would use the one on Heroku.
 
 It's like Heroku team is already almost doing this (thanks TJ ; I
 didn't noticed them) :
 ENV[COMMIT_HASH]
 ENV[LAST_COMMIT_BY]
 
 Why not another little one, `git describe --tag`, which would be
 (objectively) useful in many use cases ?
 
 Thanks
 :)
 
 Clément
 
 On May 10, 5:14 pm, Keenan Brock kee...@thebrocks.net wrote:
  Hi Clem,
  
  heroku cosole is your friend.
  
  Locally on some stage servers we use Grit.
  It ran into trouble running on passenger because git was not in the path.
  Easy to remedy, but since Grit eats the errors - it was a little tricky to 
  track down.
  
  For me at least
  Heroku has git in /usr/bin
  (do `ls /usr/bin` or Dir['/usr/bin/*']
  
  But it looks like the .git directory is not present in the app. (I did find 
  .gitignore - which was checked into git)
  
  I wonder if simply updating your deploy rake task and setting an 
  environment variable with the sha would work for you?
  
  --Keenan
  --Keenan
  
  
  
  
  
  
  
  On Tuesday, May 10, 2011 at 9:43 AM, Amokrane wrote:
   +1. Need this as well.
  
   On 9 mai, 07:25, Clément clmntlx...@gmail.com wrote:
Ok!
  
Just saying..
Wouldn't it be great to have ENV[DESCRIBE] as well,
refering to `git describe` which would allow us to show the current
version / tag of the app, and the number of commit from the last tag?
  
Thanks,
Have a nice week!
Clem
  
On 7 mai, 12:53, Clément clmntlx...@gmail.com wrote:
  
 Hi,
 Does an app have a reference to its git repo ?
 I mean : I have any chance to retrieve the last commit within the app
 itself ?
  
 I would like somthing like :
 %= `git show HEAD` % which works well on my computer but not once
 deployed on Heroku :/
  
 Thanks,
 Clément
  
   --
   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.
 

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

attachment: dev_bar.png

Re: Git commands within app

2011-05-10 Thread Keenan Brock
Hi Clem,

heroku cosole is your friend.


Locally on some stage servers we use Grit.
It ran into trouble running on passenger because git was not in the path.
Easy to remedy, but since Grit eats the errors - it was a little tricky to 
track down.


For me at least
Heroku has git in /usr/bin
(do `ls /usr/bin` or Dir['/usr/bin/*']


But it looks like the .git directory is not present in the app. (I did find 
.gitignore - which was checked into git)


I wonder if simply updating your deploy rake task and setting an environment 
variable with the sha would work for you?

--Keenan 
--Keenan

On Tuesday, May 10, 2011 at 9:43 AM, Amokrane wrote: 
 +1. Need this as well.
 
 On 9 mai, 07:25, Clément clmntlx...@gmail.com wrote:
  Ok!
  
  Just saying..
  Wouldn't it be great to have ENV[DESCRIBE] as well,
  refering to `git describe` which would allow us to show the current
  version / tag of the app, and the number of commit from the last tag?
  
  Thanks,
  Have a nice week!
  Clem
  
  On 7 mai, 12:53, Clément clmntlx...@gmail.com wrote:
  
  
  
  
  
  
  
   Hi,
   Does an app have a reference to its git repo ?
   I mean : I have any chance to retrieve the last commit within the app
   itself ?
  
   I would like somthing like :
   %= `git show HEAD` % which works well on my computer but not once
   deployed on Heroku :/
  
   Thanks,
   Clément
 
 -- 
 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.



Re: Does Heroku still support ImageMagick?

2011-05-10 Thread Keenan Brock
Hi,

Just use it in bliss

I know the heroku devs have documented using rmagic in a number of areas e.g.: 
http://devcenter.heroku.com/articles/http-caching
And in google docs.

Paperclip uses it.

You have the options of using it via:
Gemfile: rmagick
Gemfile: mini_magick
backticks


--Keenan

On Tuesday, May 10, 2011 at 8:55 PM, szh wrote: 
 I am using ImageMagick (through RMagick) in my app with no problem, but I 
 don't have any official info. 
 
  -- 
  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.



Re: Has caching strategy changed? Seeing different ETags via redbot.org

2011-04-07 Thread Keenan Brock
Barry,

One thing you may want to try.

stale?() and fresh_when() accept arrays for the :etag argument

--Keenan
On Thursday, April 7, 2011 at 9:41 AM, Todd A. Jacobs wrote: 
 Heroku doesn't support all forms of rails caching, because it's a read-
 only filesystem. ETags usually work well, but a lot depends on how
 you're generating them. I just posted over on Rails Talk about the
 fact that fresh_when() doesn't support collections, for example.
 
 You'll definitely need to provide more information about how you're
 generating your ETags to get useful help. I can assure you, though,
 that when you do it right, Varnish and the user clients see the
 correct hashes.
 
 On Apr 5, 10:30 am, Barry Hoggard ba...@tristanmedia.com wrote:
  I'm noticing that my cached pages show different ETags and contents on
  each access.
 
 -- 
 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.



Re: Public Assets and Serve

2011-03-29 Thread Keenan Brock
Hi John,

That is a rails 3.0 thing.

I thought Heroku would change that setting for you, but I may be wrong.

go into config/environments/production.rb
make sure you see:
serve_static_assets=true

more information: http://devcenter.heroku.com/articles/rails3

Good luck,
--Keenan
On Tuesday, March 29, 2011 at 3:38 PM, John W. Long wrote: 
 More info from a friend of mine:
 
  I was able to migrate from the bamboo-ree-1.8.7 stack to the 
  bamboo-mri-1.9.2 stack and everything
  was fixed. Again, what's odd is that this was sudden and wasn't happening 
  with other projects
  deployed on the same stack.
 
 My question still stands: Shouldn't Heroku automatically serve
 everything in the `public`
 directory?
 
 --
 John Long
 http://wiseheartdesign.com
 
 -- 
 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.



Re: Varnish and conditional GET

2011-03-23 Thread Keenan Brock
Hi John,

I just ran redbot on a project and am happy with the results:
I wanted the thing to never time out. (you probably want something a little 
less dramatic)

http://redbot.org/?uri=http%3A%2F%2Fmonster-avatar.heroku.com%2Favatars%2F33.png

You can look at the source to get an idea of the headers you can set:

https://github.com/kbrock/monster-avatars/blob/master/app/controllers/avatars_controller.rb

Good Luck,
Keenan


Sent with Sparrow
On Wednesday, March 23, 2011 at 10:12 AM, John McCaffrey wrote: 
 taking a look at that page using redbot.org
 
 http://redbot.org/?uri=http%3A%2F%2Fhigh-night-436.heroku.com%2Fthingies%2F1 
 
 I see that the cache is set to private, so varnish can't cache it and the max 
 age and age are both 0, so the browser thinks its stale, and has to 
 revalidate it. 
 
 For more info on this, check out the super-awesome 'Scaling Rails' series by 
 Gregg Pollack and New Relic. 
 
 Leveraging client side caching, and varnish is the best strategy to get the 
 single free dyno to take you as far as possible. (heroku is great in that 
 they encourage your 'inner cheapskate' because you really can run a full site 
 on a single dyno pretty well if you tune things well) 
 
 
 
 On Wed, Mar 23, 2011 at 5:28 AM, Toproper topro...@gmail.com wrote:
   I'm trying to learn more about caching strategies and I'm trying to
   wrap my head around conditional GET in Rails. I think I get the basic
   idea but I can't get it to work properly, or maybe I'm understanding
   it wrong. Either way, some help would be appreciated.
  
   I have made a simple test app with the following action:
  
   def show
  @thing = Thing.find(params[:id])
  fresh_when(:etag = @thing, :last_modified = @thing.updated_at.utc)
   end
  
   The url of this representation is: 
  http://high-night-436.heroku.com/thingies/1
  
   As I understand it this url should return a 304 not modified header
   after the first visit, but it doesn't. My first thought was that maybe
   I'm understanding this wrong and Varnish receives this header and
   servers the cached page, but I don't think this is happening either.
   To test this I included some code in the view that shows a random item
   from an array, if the page was server from the cache this item should
   always be the same.
  
   I think I'm misunderstanding some basic concepts here, but I can't
   figure out what those are exactly.
  
   --
   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.
 

-- 
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 is rails3_disable_x_sendfile?

2011-03-21 Thread Keenan Brock
Hi Trevor,

config/environments/production.rb line 12

  # Specifies the header that your server uses for sending files
  # config.action_dispatch.x_sendfile_header = X-Sendfile

  # For nginx:
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'

  # If you have no front-end server that supports something like X-Sendfile,
  # just comment this out and Rails will serve the files



And while you are in there,
you may want to tweak

config.serve_static_assets = true

Best of luck,
Keenan

On Mar 21, 2011, at 7:20 AM, Trevor Turk wrote:

 I'm seeing the following when pushing to Heroku:
 
 Configure Rails 3 to disable x-sendfile
 Installing rails3_disable_x_sendfile... done
 
 What is this about? Is there a way I should configure my app to avoid seeing 
 this message?
 
 -- 
 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.



Re: What is rails3_disable_x_sendfile?

2011-03-21 Thread Keenan Brock
Hello Trevor,

Web servers (e.g.: Apache) is tuned for serving up static files.
Ruby (e.g.: mongrel) is not as efficient at serving up static files.

But sometimes, your ruby code generates a file that needs to be streamed. Or it 
uses logic to determine the name of an existing file that needs to be streamed.

So there is a mechanism for ruby to set a header (X-sendfile), asking apache to 
stream the file for it.

This is nice:
a) A mongrel is not held up
b) c code can stream a file better than ruby.
c) web servers are often tuned to use OS level calls, zero copy streaming, and 
stuff. Have them maintain that configuration.

I think lighttpd introduced the flag, but I digress.


You run into a problem when the static file is not on the filesystem of the 
apache server.
E.g.: Apache is on one server and a mongrel is running on a separate machine.

So you need to tell rails to not use the handy X-sendfile header and stream the 
file through.


How this affects Heroku?

The web server is running on a different machine than the dynos. So X-sendfile 
doesn't work.
So they modify your environments/production.rb to disable that feature.

But this tweaking takes a few seconds during slug generation, and they are 
tweaking your configuration. So they give you a warning to let you know.


At least, that is my take,
Keenan


On Mar 21, 2011, at 7:45 AM, Trevor Turk wrote:

 I have:
 
 config.serve_static_assets = true
 
 ...but I don't have anything with:
 
 config.action_dispatch.x_sendfile_header
 
 ...at all. Perhaps you are doing something unnecessarily in my case? You can 
 view my app teamlab yourself on Heroku if you like. I can file a support 
 ticket if necessarily. 
 
 Also, you didn't answer my first question: what is this about ? :)
 
 Thanks,
 - Trevor
 
 -- 
 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.



Re: IDE?

2011-03-13 Thread Keenan Brock
It was moved to herokugarden.com, but alas. It is no longer with us.


And if you guys don't bring back the service from the dead, I'd love to see how 
the source worked on the back end.
Could you host something like that on Heroku?
Guess it would probably need a read/write file system.

--Keenan


On Mar 13, 2011, at 4:03 PM, szh wrote:

 I heard that there used to be a Heroku editor so you could actually make your 
 apps in the cloud too. Are there any plans to bring that back?  
 
 -- 
 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.



Re: Your application is too busy to open a console session.

2011-02-13 Thread Keenan Brock
It is a read only filesystem. So sqlite3 would not work



On Feb 13, 2011, at 6:20 AM, Vinicius de Araujo Barboza 
viniciusbc...@gmail.com wrote:

 I'm also new to Heroku and get the same error here following the
 documentation guide.
 And another question about databases:
 Does Heroku support SQLite3?
 
 On Feb 12, 10:14 am, MikeBlyth mjbl...@gmail.com wrote:
 I'm new to Heroku, trying to get my databases set up, and when I try
 to open the console this is what I get:
 
 Your application is too busy to open a console session.
 Console sessions require an open dyno to use for execution.
 
 I tried putting the application into maintenance mode in case it was
 in fact doing something, but this doesn't help. The app crashes
 whenever it starts, so hard to see how it is too busy.
 
 -- 
 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.



Re: redirect_to does not work unless call the to_s for the URL

2011-02-05 Thread Keenan Brock
When I do a redirect I try to use user_url instead of user_path.

Since the browser only redirects to absolute urls, rails converts them. No use 
having rails generate a path only to have it convert it into a url.

No idea why it would not work thought.

--Keenan



On Feb 5, 2011, at 1:19 AM, Hu Kai iamka...@gmail.com wrote:

 Hi all:
 
 The application I wrote works fine on my local machine, after I
 deployed, I found it always prompt the error:
 
 NoMethodError (private method `gsub' called for #Hash:
 0x2b4b9c6be1e0):
  app/controllers/words_controller.rb:19:in `
 
 the corresponding line is
 
 format.html {redirect_to(user_path(@word.user))}
 
 then I call the to_s
 
 format.html {redirect_to(user_path(@word.user).to_s)}
 
 which fixed the problem.
 
 Anyone knows why?
 
 -- 
 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.



Re: Scaling - Big and Fast

2011-02-03 Thread Keenan Brock
Neil,

A bit of a tangent, but...

I'd imagine varnish may cut down the load on the dynos.

Heroku may buy you quick scaling, but it also has other infrastructure 
(memcached, varnish) in place to alleviate the load.

--Keenan

On Feb 3, 2011, at 9:17 AM, Christos Zisopoulos wrote:

 100k/minute !!! And I was excited about our 1.4k/minute...
 
 As far as I can tell:
 
 Using the UI at api.heroku.com you can get up to 24 dynos.
 
 Using the CLI, 100.
 
 heroku dynos 101
 !   Dynos not allowed
 
 My guess is your DB will keel over and die way before the dynos run out. And 
 upgrading the DB is a long winded process: upgrade plan, go into maintenance 
 mode, make a backup, restore the backup... Hours for our app.
 
 -christos 
 
 On 3 Feb 2011, at 15:08, Neil Middleton wrote:
 
 This week in the UK we had the launch of police.uk, an Django based site 
 hosted on EC2.  Pretty much straight away it went down through load.  From 
 talking to the developers, it transpires that they were seeing 100,000+ 
 requests per minute, and had to draft in several hundred more EC2 instances 
 to cope.
 
 Which leads me to a tasty hypothetical question.  If for instance I wanted 
 to launch a site like that on Heroku, are there any limits to where you can 
 scale too and how long it might take?  I know from experience that I can get 
 50 dynos within a couple of seconds, but surely there must be a point where 
 this is a little harder to provision?  Are there any known limits?  What 
 happens if I want, say, 5000 dynos right now?  At what point does the DB 
 layer start to suffer?  How would Heroku handle a site of this magnitude 
 appearing 'all of a sudden'?
 
 -- 
 Neil Middleton
 
 http://about.me/neilmiddleton
 The internet's most comprehensive source for all things Neil Middleton
 
 
 -- 
 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.
 

-- 
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 rate 260 KB/s

2011-01-25 Thread Keenan Brock
Hi Oliver,

For many static files, we are using amazon s3 / cdn
That may work for you as well.

--Keenan

On Jan 25, 2011, at 2:30 PM, Dennis wrote:

 I believe the charges for an additional dyno(s) are usage based so it
 would be a relatively cheap experiment to add a dyno and do a test. I
 could be wrong in that there may be some flat charge in going from a
 free plan to a paid but I don't remember that being the case - it
 would be documented somewhere on the Heroku site.
 
 So add a dyno check the dl rates and then remove the dyno or better
 yet keep it in place for a month and enjoy the immediate response vs
 the delayed response of a first page hit (after an idle period of some
 minutes) while the single dyno spins up. A paid plan keeps the dynos
 spinning and available.
 
 On Jan 25, 11:46 am, obruening ollibruen...@googlemail.com wrote:
 I have a rails app installed on Heroku. It uses the 1 dyno free plan.
 I have measured the download rate with the download of a static file
 (200KB) from the rails public folder. The result is 260 KB/s. Are
 there better higher download rates in the paid plans?
 
 Best regards
 Oliver
 
 -- 
 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.



Re: creating a virtual file

2011-01-24 Thread Keenan Brock
Hi Shai,

It sounds like the app is using XML as their data store.

And right now, rails (and Heroku) make it easier to use a relational db to 
store data.

While you could hack together a solution that stores the data file in memcache, 
redis, or something, I wonder how hard it would be to just store the 
relationships as active record models in postgres.

Think I'd either tweak to use SQL or use a different project.

best of luck,
Keenan


On Jan 24, 2011, at 3:37 PM, bluewave shai.sayfanalt...@googlemail.com wrote:

 I have an application I want to use (http://www.flashxml.net/galleries/ )
 this application needs to update an xml file with all the images information 
 in it. 
 if I would be working on disk based system I would just update this file so 
 the web browser can read it.
 because I am using Heroku I can not update this file in the OS. do you know 
 if I could use send_data to send this xml file instead of using the file on 
 the OS? if you now how to do this please share this with me.
 
 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.

-- 
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: Block On File Upload

2011-01-13 Thread Keenan Brock
Hi Tobes,

Not sure if this overlaps, but something else to consider:

http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?uploadobjusingmpu.html

Good luck,
Keenan

On Jan 13, 2011, at 3:33 PM, Jimmy Thrasher wrote:

 Hi Tobes,
 
 Unless they've removed the 30s hard limit, you should see those requests 
 dying after 30s, but yes, in theory if it takes 10 minutes it blocks your 
 upload.
 
 An approach I like but have never had the need to implement would be to use 
 the upload by POST technique, described here: 
 http://aws.amazon.com/articles/1434?_encoding=UTF8jiveRedirect=1
 
 You basically create a signed URL with an expiration date which allows a user 
 to upload to a bucket you have rights to. There are third party utilities, 
 often written in Flash, to help you accomplish this.
 
 Hope that helps,
 
 Jimmy
 
 On Thu, Jan 13, 2011 at 3:28 PM, Tobes to...@tobinharris.com wrote:
 Hi guys
 
 Sorry, this is a lazy question...
 
 If we have 1 dyno, and a user uploads a file that takes 10 minutes,
 will the other requests to the app be blocked for 10 minutes?
 
 Looking at our logs it looks like that *is* the case. We do store
 files on S3 btw, but our Rails app receives the file and moves it to
 S3. It's the blocking we're interested in knowing about (I know Rails
 doesn't block usually)
 
 Tobin
 
 --
 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.
 
 
 
 
 -- 
 +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 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.



Re: 1 hour inactivity idling and http caching

2011-01-07 Thread Keenan Brock
Hi,

Heroku is providing a service for free. Which is great.
So if no one is using your app, heroku swap the app out out so other apps can 
use the memory for their free apps.
Think shared hosting.
But for free.

If you want your app to be a production app and always instantly available, 
then you may want to upgrade to 2 dynos ($36/month).

--Keenan

On Jan 7, 2011, at 10:12 AM, Jesse wrote:

 I set up http://pingdom.com/ to monitor my site, you can set it up to
 hit it every 5 minutes
 this will keep it 'up and running' on heroku as well as inform you of
 down time
 
 you get 1 url for free
 
 not sure if this will solve your problem as you have only 1 cached
 page, but something to consider?
 
 - Jesse
 
 On Jan 7, 3:44 am, Martin Petrov m.p.pet...@gmail.com wrote:
 Well, you must be right. I don't have a very good understanding of how
 it works. Thank you Smith!
 
 On Jan 7, 1:08 pm, Steve Smith st...@scsworld.co.uk wrote:
 Perhaps as the routing engine shuts down the app it also empties varnish. 
 That would actually seem quite likely?
 
 On 7 Jan 2011, at 11:03, Martin Petrov wrote:
 
 If this is the case then I should remove http caching in order to
 prevent the app from shutting down as much as possible.
 But... why requesting a cached page starts the app if the request is
 never handled by the app?
 
 On Jan 7, 11:18 am, Steve Smith st...@scsworld.co.uk wrote:
 I'm not an expert on this so I would double check, however I think this 
 is all the case,
 
 If you only have one dyno then the app will shutdown when there are no 
 requests for a certain time period. I believe this isn't the case once 
 you have more than one dyno but in my experience at that point you have 
 enough concurrent connections to keep things alive anyway.
 
 If you are caching the page it will be stored in varnish so the request 
 will never be handed out to the app and will therefore allow the app to 
 shutdown.
 
 Steve
 
 On 7 Jan 2011, at 09:02, Martin Petrov wrote:
 
 Hi,
 
 Looking at my logs I see that if my application is not used for 1 hour
 its state is changed from up to down. Next time a request comes it
 takes several seconds to start again.
 
 Does requesting an http cached page keeps the application alive? My
 app has only one page, which is http cached.
 
 --
 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.
 

-- 
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 Keenan Brock
Hi Carson

You probably already tried this, but

In your browser, for local dev, could you check your zoom level?
You may have enlarged your font with command plus.

There is a menu option for resetting it to normal view. (exact verbiage escapes 
me but should be near increase font size in view or window)

Hope that helps
--Keenan


On Jan 4, 2011, at 7:01 PM, Carson Cole carson.c...@gmail.com 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.
 

-- 
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: how to use Heroku in development with view designers?

2011-01-06 Thread Keenan Brock
It may be hard for the dev to develop haml/erb without the models to populate 
it.

1. Have them dev in pure html using a scratch directory in public. Create a 
separate git repo that only has your public in it

You can go have public as a submodule route or you can just have 2 different 
projects and do duffs. Since you are going to need to translate back into 
haml/erb at some point anyway.

Second idea is to keep models innocuous and put truely proprietary logic in 
external modules. Have them as a gem or plugin and don't include it in your 
main repo.

One thought:

Many designers I know are quite comfortable with haml/sass or erb/css. Or 
atleast they can tweak and improve it if not author it.

Why work with people you don't trust?

Why handicap them just to make more work for yourself?

Rhetorical questions for you only. But I wanted to put out there.

Keenan
On Jan 5, 2011, at 9:10 AM, Lille lille.pengu...@gmail.com wrote:

 Hi,
 
 I developed a Rails app, now hosted on Heroku, and I would like to
 make it available to HTML and javascript contractors for further
 development in sort of a Rails-agnostic way, while keeping private
 certain parts of the app directory structure, viz., my models, which I
 consider proprietary.
 
 By 'Rails-agnostic', I hoped someone out there could confirm that
 development can proceed with front-end collaborators on Heroku relying
 solely on the collaborators' knowledge of Git, not the app platform,
 which is Rails.
 
 With regard to keeping certain parts of my app structure private, I
 understand this is possible on some source control systems. What about
 in the case of collaborating via Heroku?
 
 Thanks,
 
 Lille
 
 -- 
 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: Changing an application when not an owner

2011-01-04 Thread Keenan Brock
Neil,

You may want to check out this article:

http://getsatisfaction.com/heroku/topics/can_i_use_different_heroku_credentials_on_different_projects

Please share if any of those suggestions work for you.

--Keenan
On Jan 4, 2011, at 11:50 AM, Neil wrote:

 Back when the Heroku gem used a credentials file, we were able to change our 
 'user' from the command line so that we could interact with different apps 
 (we have all our apps on a company account, but locally use our own accounts 
 via collaboration)
 
 Question is, given that the credentials file is now gone, how can we we 
 'sudo' up to the app owner in order to make changes?  Is there an easy way of 
 changing user in the Heroku 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.

-- 
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: Wildcard subdomains with GoDaddy

2010-12-20 Thread Keenan Brock
Hello Barry,

I like having a single url for my address.

So I setup a redirect that bounced  www.mydomain.com to http://mydomain.com/

I remember godaddy was a little tricky on this one. Think they were able to 
redirect www.mydomain.com to mydomain.com but able to redirect mydomain.com to 
www.mydomain.com

But Orien's solution for using wild cards works as well.

--Keenan

On Dec 20, 2010, at 2:15 PM, Barry Welch wrote:

 I am also having trouble with GoDaddy + Heroku with wildcard
 subdomains
 
 In my setup, since GoDaddy apparently doesn't allow wildcard CNAMES, I
 currently have 3 A-records that look like this:
 
 A-Record  *   75.101.163.44
 A-Record  *   75.101.163.44
 A-Record  *   75.101.163.44
 
 .. with no CNAMES.
 
 Of course, this means 'http://www.mydomain.com' will load just fine,
 but 'http://mydomain.com' will not.
 Aside from changing registrars or using the Zerigo add-on, I am at a
 loss as to how to set this up.
 
 The Heroku documentation about wildcard domains is vague, stating:
 
 To use with a custom domain, configure your registrar to point
 *.yourdomain.com at heroku.com. If things are set up correctly you
 should be able to look up any arbitrary subdomain:
 
 ... which seems like a cop-out statement.
 
 Any ideas on this?
 
 On Nov 15, 11:57 am, Keenan Brock kee...@thebrocks.net wrote:
 Hi Jeff,
 
 I had it working before I switched everything over tohttp://namecheap.com/
 
 2 things to try:
 1) try an @ instead of a *
 2) try using A records instead of a CNAME (3 of them)
 
 dns numbers are athttp://docs.heroku.com/custom-domains
 75.101.163.44
 75.101.145.87
 174.129.212.2
 
 --Keenan
 
 On Nov 14, 2010, at 12:48 AM, Jeff wrote:
 
 
 
 Having trouble setting up GoDaddy for wildcard subdomains. I have one
 domain registered with Dreamhost, and it works fine. Not sure what's
 different with GD.
 
 I have the three A records:
 
 A   @   174.129.212.2
 A   @   75.101.145.87
 A   @   75.101.163.44
 
 But I can't set up a CNAME like this:
 
 *  CNAME   proxy.heroku.com.
 
 With DH, this works. But with GD, I can't find the right way to
 handle. Any ideas?
 
 --
 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.- Hide quoted text -
 
 - Show quoted text -
 
 -- 
 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: github help

2010-12-03 Thread Keenan Brock
You may want to double check the ref on prod. I see the app name is myapp but 
the ref is myapp-prod. (may be correct or a translation layer)

Also, you may want to create a local branch for production. Up to you.
Have that branch tied to production. But that is up to you / your workflow.

Last: you have staging. If that is working for you, then it would seem prod 
should work as well.

--K



On Dec 3, 2010, at 5:47 AM, Graeme Simpson gra...@simmo.gs wrote:

 I've added a new remote origin, but what do I change the remote name to (does 
 it matter) and the fetch line in my .git/config file?
 
 [remote heroku-staging]
 url = g...@heroku.com:myapp-staging.git
 fetch = +refs/heads/*:refs/remotes/heroku-staging/*
 
 [remote heroku-prod]
 url = g...@heroku.com:myapp.git
 fetch = +refs/heads/*:refs/remotes/heroku-prod/*
 
 At the moment I've added the lines above, but I'm a bit concerned that now 
 I've changed things, when I run 'git push heroku-prod master' (assuming 
 that's right!) it won't push a load of nonsense or break my live app. Or do I 
 just have to try it!
 
 Cheers,
 Graeme
 
 
 On 2 December 2010 12:10, Alex a...@heaton.me wrote:
 Hopefully I haven't misunderstood. :
 
 Create a new repo on github, follow it's instructions for adding an
 existing project. (something like 'git remote add origin
 g...@github.com/blablabla' )
 
 Now, just push and pull from your github repo instead. When you want
 to send changes to heroku, do a push to heroku.
 Use different branches for different release stages (staging,
 production etc).
 
 Does that make sense?
 
 On Dec 1, 1:59 pm, Graeme Simpson gra...@simmo.gs wrote:
  Hi there,
 
  I have an app on heroku at the moment and so far we've just been using git
  on heroku as our main repository.
 
  We need to switch things around so we use github most of the time and have a
  separate app for staging and testing.
 
  I found this excellent guide for setting up github with 
  herokuhttp://suitmymind.com/blog/2009/06/02/deploying-multiple-environments...
  but it only covers new applications.
 
  Does anyone have any instructions (or could point me at an alternative
  guide) for switch the repos around to use github as the master?
 
  Thanks,
  Graeme
 
 --
 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.

-- 
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: Wildcard subdomains with GoDaddy

2010-11-15 Thread Keenan Brock
Hi Jeff,

I had it working before I switched everything over to http://namecheap.com/

2 things to try:
1) try an @ instead of a *
2) try using A records instead of a CNAME (3 of them)


dns numbers are at http://docs.heroku.com/custom-domains
75.101.163.44
75.101.145.87
174.129.212.2



--Keenan

On Nov 14, 2010, at 12:48 AM, Jeff wrote:

 Having trouble setting up GoDaddy for wildcard subdomains. I have one
 domain registered with Dreamhost, and it works fine. Not sure what's
 different with GD.
 
 I have the three A records:
 
 A   @   174.129.212.2
 A   @   75.101.145.87
 A   @   75.101.163.44
 
 But I can't set up a CNAME like this:
 
 * CNAME   proxy.heroku.com.
 
 With DH, this works. But with GD, I can't find the right way to
 handle. Any ideas?
 
 -- 
 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: odd issue with bundler, rails3, on bamboo 1.9.2

2010-11-05 Thread Keenan Brock
I'd move the requirement for daemons closer to the beginning in your Gemfile. 
So it will trump the other gem that requires a lower version.

On Nov 5, 2010, at 1:04 PM, Steve Smith wrote:

 No sorry it is good practice I wanted to make sure that it was included 
 sorry, but if you open up the lock file locally you should be able to see 
 what is requiring daemons 1.1.0. or at least what may be requiring daemons. 
 Do you need that specific version of daemons or would 1.1.0 work for you?
 
 I actually thought this was what the lock file is supposed to be solving 
 though. Does anyone else know why it may not be being used?
 
 Steve
 
 
 On 5 Nov 2010, at 16:56, Kyle Bragger wrote:
 
 Yes lockfile is Commited. Read that was good practice. Not so?
 
 On 5 Nov., 12:52, Steve Smith st...@scsworld.co.uk wrote:
 I have a feeling daemons 1.1.0 is included as a requirement of something 
 else, are you also committing the lock file? The lock file should also show 
 you what is requiring what.
 
 Steve
 
 --http://cloudmailin.com
 @cloudmailin
 Incoming email for your web app
 
 On 5 Nov 2010, at 16:45, Kyle Bragger wrote:
 
 
 
 Hey all — setting up a vanilla Rails 3 app on the bamboo 1.9.2 stack
 and getting the following:
 
   You have already activated daemons 1.1.0, but your Gemfile
 requires daemons 1.0.10. Consider using bundle exec.
 
 Maybe I'm missing something obvious, but if the gemfile specifies the
 daemons version, why would Heroku barf?
 
 Thanks for the help!
 
 Here is my Gemfile:
 
 source 'http://rubygems.org'
 
 gem 'rails', '3.0.1'
 
 # Bundle edge Rails instead:
 # gem 'rails', :git = 'git://github.com/rails/rails.git'
 
 gem 'pg'
 gem 'devise'
 gem 'paperclip'
 
 gem 'daemons', '1.0.10'
 
 group :development do
 #gem 'test-unit'
 #gem 'redgreen'
 gem 'mongrel'
 gem 'heroku_san'
 end
 
 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group 
 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.
 
 
 -- 
 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: Compiled Slug size not changing after removing large gems from Gemfile

2010-10-12 Thread Keenan Brock
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 stephenjamesmurd...@gmail.com
 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.
 

-- 
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 Keenan Brock
Hi Brandon,

Once, I had changed my memcache client library and it started raising 
exceptions.
Turns out the previous library just returned a nil, while this one raised an 
exception. So I hacked the library to return nil on failures rather than throw 
exceptions.

(The previous library just returned a nil not failing)


This seems like the answer for me.

Maybe alter the gem and add the option to throw an exception instead of 
returning a nil.


But it is curious that it would fail so many times.

--Keenan
 
On Oct 5, 2010, at 9:25 AM, Brandon Casci wrote:

 It took a few days for the ticket to get answered, but yesterday did get 
 confirmation from Heroku that this was a problem, with Amazon EC2 causing the 
 pain. See this:
 
 http://getsatisfaction.com/heroku/topics/sporadic_errors_with_memcache_addon
 
 I have the same symptoms they mention, though for my app it's not sporadic, 
 it's a state. The only way I can seem to shake it is by opening the rails 
 console and doing Rails.cache.clear, and things go back to normal until 
 problem kicks back up again.
 
 I'd rate this problem a 9.5 out of 10 for my app.
 
 What makes things particularly difficult for me is input comes in from 
 outside sources and sits in memcache. In this case, what a radio station is 
 currently playing, and it should stay there until the next time until new 
 data comes in via the API. I suppose it's fair to say that data should be 
 placed in the DB, which is fine. I can do that, and then do a 
 Rails.cache.fetch from there. Any miss would mean another AR query instead of 
 a nil. That's still a problem though, because a lot of supplementary data 
 gets queried with the song title, artwork, photos, products and more. So all 
 those cache misses will have a recognizable negative impact.
 
 
 
 
 On Tue, Oct 5, 2010 at 9:13 AM, John Norman j...@7fff.com wrote:
 Brandon: Regretably, I'm cheating and am using the Dalli gem without the 
 guidance of Heroku. :-( I couldn't get memcached-northscale to compile on my 
 Mac. Whatever.
 
 In any case:
 
  Rails.cache.write foo, bar
 = true
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
  Rails.cache.read foo
 = bar
 
 
 
 On Mon, Oct 4, 2010 at 3:53 PM, Brandon Casci bran...@loudcaster.com wrote:
 Yep :)
 
 
 On Mon, Oct 4, 2010 at 4:48 PM, Teng Siong Ong siong1...@gmail.com wrote:
 are you sure that you are using the supported memcache gem? 
 http://docs.heroku.com/memcache
 
 On Mon, Oct 4, 2010 at 3:43 PM, Brandon Casci bran...@loudcaster.com wrote:
 It's crazy making.
 
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = 1
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = 1
  Rails.cache.read mykey
 = nil
  Rails.cache.read mykey
 = nil
 
 
 On Sat, Oct 2, 2010 at 7:58 PM, Brandon Casci bran...@loudcaster.com 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
 Loudcaster
 http://loudcaster.com
 =
 
 
 
 -- 
 =
 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.
 
 
 -- 
 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.
 
 
 
 -- 
 =
 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 

Re: two heroku apps talking to same db

2010-10-05 Thread Keenan Brock
Hello Joel,

I believe the party line is to use web services.
It provides a much better extraction layer. But can be a little tricky.


Thought there was an example out there with CAS and single signon
Can't find it.


Does anyone on the list remembers the link to the single signon example?

--Keenan
On Oct 4, 2010, at 11:16 PM, Joel VanderWerf wrote:

 
 Is it possible for two apps on heroku to access the same database?
 
 -- 
 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: two heroku apps talking to same db

2010-10-05 Thread Keenan Brock
That is great,

If you blog about your experience, could you send the link to the list?

--Keenan
On Oct 5, 2010, at 2:44 PM, Joel VanderWerf wrote:

 On 10/05/2010 11:42 AM, Keenan Brock wrote:
 Hello Joel,
 
 I believe the party line is to use web services.
 It provides a much better extraction layer. But can be a little tricky.
 
 
 Thought there was an example out there with CAS and single signon
 Can't find it.
 
 
 Does anyone on the list remembers the link to the single signon example?
 
 Actually, the answer from heroku support is yes:
 
 Question: If I develop two heroku apps, can they access a single database? 
 The reason I ask is that we have a rails app and a sinatra app, and they need 
 to share a postgres database. Would rather not do that by http!
 
 Answer from heroku support: Yes, if you need to, you can. Every Heroku app 
 gets a database provisioned by default, but it's possible for one app to use 
 another app's database simply by copying the DATABASE_URL config var from one 
 app to another.
 
 
 -- 
 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: Caching of /public files

2010-09-22 Thread Keenan Brock
I agree with Steve,

1) Static assets served from public are cached for 12 hours. ( 
http://docs.heroku.com/http-caching under Static Assets)


2) Setting up your own Rack::Static has a bug in it that is not setting the 
cache headers, and it is not possible to override. I thought the Heroku team 
was either fixing it or had fixed it recently.

--Keenan
On Sep 22, 2010, at 7:09 AM, Steve Smith wrote:

 Does Heroku not apply these headers for you? Looking at my site I see 
 Cache-Control:public, max-age=43200 added to any images served from public?
 
 I was surprised to learn that ActionDispatch::Static/Rails doesn't cache the 
 static files in production but I guess it does make sense. You could always 
 add a caching middleware if you really need to? You can also pass 
 Cache-Control headers into Rack::Static too but I'm not sure how you would 
 tell Rails to do that?
 
 Steve
 
 On 22 Sep 2010, at 11:39, Alex wrote:
 
 Sorry, I should have specified,
 
 the files stored in /public on rails for instance. These aren't
 managed by a controller (so no headers that way) and I was wondering
 if heroku had a default approach to them.
 
 It occurs to me that this may be entirely a Rack issue, though
 hopefully somebody here can point me in the right direction.
 
 
 
 On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote:
 This what you're looking for?http://docs.heroku.com/http-caching
 
 
 
 On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote:
 I'm wondering about the options for caching of public files, I would
 image they are cached by default?
 
 How do you set caching headers on them for instance?
 
 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.
 
 
 -- 
 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: Caching of /public files

2010-09-22 Thread Keenan Brock
I could have sworn it was 24. But the documentation said 12...

http://docs.heroku.com/http-caching

What is the best channel to request an update to the docs?

--Keenan

On Sep 22, 2010, at 3:08 PM, Oren Teich o...@heroku.com wrote:

 Heroku by default caches all static assets in /public for 24 hours.
 
 Oren
 
 On Wed, Sep 22, 2010 at 3:39 AM, Alex a...@heaton.me wrote:
 Sorry, I should have specified,
 
 the files stored in /public on rails for instance. These aren't
 managed by a controller (so no headers that way) and I was wondering
 if heroku had a default approach to them.
 
 It occurs to me that this may be entirely a Rack issue, though
 hopefully somebody here can point me in the right direction.
 
 
 
 On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote:
 This what you're looking for?http://docs.heroku.com/http-caching
 
 
 
 On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote:
 I'm wondering about the options for caching of public files, I would
 image they are cached by default?
 
 How do you set caching headers on them for instance?
 
 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.
 
 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.
 
 
 
 -- 
 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: wonderful platform for app staging...

2010-09-20 Thread Keenan Brock
Hi Roy,

Have you checked out http://docs.heroku.com/ ?

--Keenan




On Sep 20, 2010, at 8:32 PM, Roy Wang dinoro...@gmail.com wrote:

 Yes, GitHub+Heroku is fantastic. If only Heroku had better documentation... 
 Is there a wiki for Heroku? 
 
 Roy
 
 
 
 On Tue, Sep 21, 2010 at 8:07 AM, Dennis dennismaj...@gmail.com wrote:
 I believe Rails 3 works with Ruby 1.8.7:
 
 http://edgeguides.rubyonrails.org/getting_started.html
 
 I think it is only a couple of p releases of 1.8.7 that cause problems
 (see above link) ... later versions of 1.8.7 are available - for
 windows at least and I think archived versions of 1.8.7 would be
 available for other OS's
 
 On Sep 19, 1:26 pm, kadoudal kadou...@gmail.com wrote:
  I subscribed recently to Heroku  and found how easy it is (together
  with GitHub)  to deploy apps and test them 'live'
  HOWEVER all new Rails applications are to be designed with the pair
  Rails3-Ruby1.9.2 as they have been released
  unfortunately Heroku does support Rails3 only with Ruby 1.8.7 at the
  present time...  and I have to go back to my old staging deployment
  environment...
 
  I hope they will support 1.9.2 asap  , any idea of when this could
  happen ??   matter of weeks.. months.. quarters..
 
  hungry now ...
 
 --
 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.

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



Re: Git, SVN and Heroku

2010-09-10 Thread Keenan Brock
Hi

1. Use git as your client (with git-svn).

Then just update (from svn) and push to heroku.
It works great.

If you have trouble, ping me. I haven't done this recently, but can try and dig 
up some stuff if you need.

Issues you may see:
deleting directories (e.g. vendor/gems/* )in git doesn't always translate to 
svn. So sometimes you get a fail there. Otherwise it works without a hitch.

2. Use svn and git
use svn like you always do
setup git as a duplicate version control system in the same directory.

When you want to push, just check the files into git (git commit -a) and push 
to heroku.

I know someone who did this and said it worked for him.

Good Luck,
--Keenan


On Sep 9, 2010, at 12:16 AM, Swards wrote:

 I work on a team that uses SVN for source control (a separate
 discussion is in the works to get them moved over to git), and we
 would like to check out of svn and push to Heroku.  I can't figure out
 how to do this very easily.  Is there a way to turn an existing
 directory (checked out by svn) that has not yet been initialized in
 git, initialize it, and allow that to be pushed to Heroku, essentially
 overwriting the existing code on Heroku?
 
 I'm trying to allow multiple team members to checkin to svn and push
 to Heroku via Git.
 
 -- 
 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: Automatic tagging of your 'real' git repo after push

2010-09-08 Thread Keenan Brock
Hi Jeff,

Jeweler has a rake task to send tags to github.

You may want to take a peek in there to get the code you need.

Setting up a deploy:prod rake task or something could tag, push to github, and 
push to heroku. - Or what ever your process may be.

If you can't find what you need, send a ping across and I'll help where I can.

--Keenan

On Sep 8, 2010, at 9:13 AM, JDeville wrote:

 I'd like to have every push to prod be automatically tagged in some
 way.  (My repo is on github) I know with the http hooks I should be
 able to write something that will do this, but I thought I'd see if
 it'd already been done.

-- 
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 Keenan Brock
Hello Deepak,

A single / free dyno spins down when it is not in use.
Much like passenger / mod_rails on your local box.


It cost ram/cpu/money to run a dyno on an ec2 instance.
If you are not using it (and you are not paying for it), then there is no 
reason why Heroku should dish out the money to pay for something you are not 
using.

If you want to pay for it by getting another dyno, then I guess you can be the 
judge on whether to have the app running or not.


It seems curious to me that people want Heroku to pay for their staging 
environment to be up all the time.
For me, staging is a pre-release testing environment.   Guess others have a 
different view.

Keenan

On Aug 29, 2010, at 6:48 AM, deepak wrote:

 what is the reasoning behind this. Did you test this or is it given in
 the docs?
 Deepak
 
 On Aug 26, 11:32 pm, Eric Anderson e...@pixelwareinc.com wrote:
 On 08/26/2010 11:30 AM, marcel wrote:
 ..
 OTOH if you pay for at least 2 dynos then they NEVER spin down meaning
 your app is always nice and responsive even if nobody has it it for a while.
 .
 Eric
 
 -- 
 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: Ruby 1.9.2

2010-08-30 Thread Keenan Brock
Hi,

I remember hearing:

We will add support for 1.9.2 when the community releases the official release.
But it looks like it will be out soon.

http://twitter.com/heroku/status/21517412884

http://blog.heroku.com/archives/2010/6/15/rails_3_beta_4_on_heroku/

--Keenan

On Aug 27, 2010, at 10:19 AM, morgoth wrote:

 ping
 
 -- 
 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: how to setup mime-type in my rails app

2010-06-24 Thread Keenan Brock
Hello Eki,

Sorry - should have seen this before.

The mime type that you are setting is for your rails app.
The jad/jar files are being served from the http server.

So you need to configure the http server for the mime type.

I don't know how to modify the http server mime-types - couldn't find it at 
http://docs.heroku.com/

The options that you are more in control:
1) serve up the file from s3
2) serve up the file via Rack/Metal/Rails
  set the cache to use varnish
  set the mime-type
  http://docs.heroku.com/http-caching

Serving the file from apache (the public directory) would be the preferred 
route, but if you are up against a deadline, maybe the 2 options above may help

Good luck,
Keenan
On Jun 24, 2010, at 4:44 AM, Eki wrote:

 Hey Keenan ,
 I would like to thank you for your swift response and your welling to
 help ,
 anyways I can't use the FF since I'm using this for mobile application
 u know , and anyways its not working even for FF .
 
 I did what you told me , check out the outputs below
 
 telnet http://falling-autumn-84.heroku.com 80
 Trying 75.101.163.44...
 Connected to heroku.com.
 Escape character is '^]'.
 HEAD RamadanApp_100.jad HTTP/1.1
 Host http://falling-autumn-84.heroku.com
 HTTP/1.1 400 Bad Request
 Cache-Control: no-cache
 Pragma: no-cache
 Content-Type: text/html; charset=utf-8
 Connection: Keep-Alive
 Content-Length: 691
 
 I'm not sure if I did that right way , anyways check it out yourself ,
 try to install the following jar file 
 http://falling-autumn-84.heroku.com/RamadanApp_100.jad
 and check out the result .
 
 Thanks in advance
 Eki
 On Jun 24, 4:46 am, Keenan Brock kee...@thebrocks.net wrote:
 Hey Eki,
 
 hostname = the name of your app
 filename = the name of the jar file
 
 telnet hostname 80
 HEAD filename HTTP/1.1
 Host: hostname
 
 (2 returns)
 
 What does it say is the Content-Type?
 
 There is probably an easier way to just use firefox ...
 
 --Keenan
 
 On Jun 23, 2010, at 6:53 AM, Eki wrote:
 
 
 
 Hi there ,
 Is there anyway to setup mime-type of jar file , I need my mobile app
 to download some jar file in public folder , I adding some code for
 mime_type.rb file something like this :
 
 Mime::Type.register text/vnd.sun.j2me.app-descriptor, :jad
 Mime::Type.register application/java-archive, :jar
 
 but still not working . whenever I read the jad file it read it as
 text instead of downloading it .
 
 Any help will be highly appreciated .
 
 Cheers
 
 --
 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.
 

-- 
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: Programmatically Spinning Workers Up and Down

2010-06-23 Thread Keenan Brock
Pedro,

This is great!

One concept I got from a 2007 IT Conversation podcast interviewing GigaVox and 
SmugMug:

You are optimizing cost vs responsiveness.
Reducing the granularity of startup and shutting down of instances saves quite 
a deal of money.


Don MacAskill spoke more about this and SkyNet:
http://don.blogs.smugmug.com/2008/12/09/on-why-auto-scaling-in-the-cloud-rocks/
http://don.blogs.smugmug.com/2008/06/03/skynet-lives-aka-ec2-smugmug/


I don't have anything more recent. Please share if anyone does.


--Keenan
On Jun 23, 2010, at 12:56 AM, Pedro Belo wrote:

 Hi Chris,
 
 There is. I made a little proof using DJ that might give you some insight.
 
 The code is on this branch:
 http://github.com/pedro/delayed_job/commits/autoscaling
 
 And instructions/notes are on the comments here:
 http://github.com/pedro/delayed_job/commit/09d7657e1fc7d25072e6c5e73ede20d6e1185eac#commitcomment-58225
 
 On Fri, Jun 18, 2010 at 2:33 AM, Chris Kalaboukis thinkfut...@gmail.com 
 wrote:
 Hi guys: I saw an old thread on this but there seemed to be no answer.
 Is there a way within my app to shut down and restart all the workers
 programmatically? I have a twitter harvesting app which requires it
 and I need to do it manually. Is there a doc somewhere  which
 describes how to do it?
 
 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.
 
 
 
 -- 
 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: how to setup mime-type in my rails app

2010-06-23 Thread Keenan Brock
Hey Eki,

hostname = the name of your app
filename = the name of the jar file


telnet hostname 80
HEAD filename HTTP/1.1
Host: hostname

(2 returns)

What does it say is the Content-Type?

There is probably an easier way to just use firefox ...

--Keenan

On Jun 23, 2010, at 6:53 AM, Eki wrote:

 Hi there ,
 Is there anyway to setup mime-type of jar file , I need my mobile app
 to download some jar file in public folder , I adding some code for
 mime_type.rb file something like this :
 
 Mime::Type.register text/vnd.sun.j2me.app-descriptor, :jad
 Mime::Type.register application/java-archive, :jar
 
 but still not working . whenever I read the jad file it read it as
 text instead of downloading it .
 
 Any help will be highly appreciated .
 
 Cheers
 
 -- 
 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: Failing Routes

2010-06-21 Thread Keenan Brock
disclaimer:
I have not installed rails 3 yet.

My reaction is they are looking for controller Admin::HomeController in file 
app/controllers/admin/home_controller

--K

On Jun 21, 2010, at 11:03 AM, Neil wrote:

 I have an app that has the following in the routes file:
 
  namespace admin do
# ADMINISTRATIVE ROUTES ONLY
root :to = 'home#index'
 
resources :comments do
  member do
get :approve
get :reject
  end
end
resources :users do
  member do
get :block
get :unblock
  end
end
  end
 
 When browing to /admin locally, I am greeted by the appropriate page.
 On the same URL on the heroku version I get a 404.  The route shows
 correctly in 'heroku rake routes'
 
 Logs are showing:
 ActionController::RoutingError (wrong constant name Admin/
 homeController):
 /disk1/home/slugs/196384_c95a9e3_4463/mnt/.bundle/gems/gems/
 activesupport-3.0.0.beta4/lib/active_support/inflector/methods.rb:
 103:in `const_defined?'
 
 Any ideas?
 
 -- 
 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: Project.where(:status = true)

2010-06-16 Thread Keenan Brock
Hey,

I was on a project that was supporting mysql (local build machine), sqlite3 
(developer's box), and posgres (heroku)

the boolean instances were very tricky across these.
Date logic is also a pain ( e.g. time = NOW() )


I ended up implementing a hack on top of active_record connection, that worked, 
but I wasn't too happy.
If someone has a better solution - please share.

--Keenan

http://gist.github.com/440903





On Jun 16, 2010, at 10:22 AM, Steve Smith wrote:

 Looks like Arel might not be escaping the true correctly which is strange. 
 How about 
 
 p = Project.where([status = ?, true])
 
 Does that do the same thing?
 Steve
 
 
 On 16 Jun 2010, at 14:46, webdevotion wrote:
 
 Hey
 
 We have a problem with our Projects controller.
 Where we want to select all  the projects with status set to true we
 use:
 
 p = Project.where(:status = true)
 
 It works locally, but it doesn't work on the Heroku instance.
 
 Does work, but not agnostic
 p = Project.where(:status = '1')
 
 What's the best practice to solve this ( little ) 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.
 
 
 -- 
 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: Preserve cache

2010-06-12 Thread Keenan Brock

S3?

On Jun 12, 2010, at 2:41 PM, Alan B listst...@gmail.com wrote:


Hi all, I have an app that generates a lot of PDF files that never
need to change. I was going to generate them once and then cache them
using Varnish and a long expires header. However, I see from the
heroku docs that the cache is purged whenever I deploy. Is there any
way to prevent this from happening?

--  
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: Newrelic Bronze and Heroku

2010-06-11 Thread Keenan Brock
Many hosting providers have figured out it is cheaper for them to run  
efficient websites than inefficient ones.


Engine yard gives away rpm as well. Or at least they did.

I'm pretty sure bronze is 100% free

--Keenan

On Jun 11, 2010, at 3:52 PM, Amiruddin Nagri amir.na...@gmail.com  
wrote:




Heroku is offering Newrelic bronze integration for free, whereas the  
Newrelic site have a subscription fee for bronze version.


How is this possible ? Is there a hidden cost that I am missing  
out ? Will I be charged under any circumstances either from Heroku  
or Newrelic for using this free bronze integration.


Regards,
Amiruddin Nagri,
Bangalore, 560008, KA
India

Y! IM : amir_na...@yahoo.com
GTalk : amir.na...@gmail.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: EXIF support on Heroku?

2010-06-08 Thread Keenan Brock
Kinda a hack but

If you look at mysql, they compile native c code.

I played with this in http://github.com/kbrock/tclink

Not sure what the dependencies are, but wonder if the code is tight enough to 
embed it in a gem.


--K
On Jun 8, 2010, at 10:37 AM, Richard Conroy wrote:

 
 
 On Tue, Jun 8, 2010 at 3:15 PM, Patrick Crowley patr...@mokolabs.com wrote:
 Has anyone been able to extract EXIF information from photo uploads on
 Heroku?
 
 Most EXIF parsing gems are wrappers for libraries that aren't
 available on the Heroku stack. (And we can't install these libraries
 manually as you'd normally do on a VPS.)
 
 
 You can install non-standard gems on heroku. You need to look into updating
 your .gems file manifest. It can be a bit tricky if your gem has dependencies
 that are not part of the heroku stack. It will compile native gems for you 
 (within
 reason - no Win32 gems for instance) and generally works pretty well.
  
 It can make your app size very big though, and can make deploy times very
 lengthy.
  
 
 -- 
 http://richardconroy.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: Spree 0.10.2 can't start on Heroku

2010-06-02 Thread Keenan Brock
Hi,

I'm not a spree person, but I have ported frameworks to heroku. (e.g.: loved by 
less)

not sure if this was already answered

Why not copy the default theme to the target spot on your own?
Seems the startup code would not copy if it it already existed.
And if it did copy it, just add the File.exist code and submit a patch.

see who calls 
spree-0.10.2/lib/plugins/extension_patches/lib/asset_copy.rb
and see if you can get around it

--Keenan

On Jun 2, 2010, at 10:03 AM, Olivier R wrote:

 Heroku apps don't have write privileges which causes this exception on
 startup. Is there a way to go around this?
 
 Check this out: http://paddock.heroku.com
 
 /home/slugs/196124_7d3212a_92f9/mnt/.gems/gems/spree-0.10.2/lib/spree/
 file_utilz.rb:61:in `mirror_files': Could not copy /home/slugs/
 196124_7d3212a_92f9/mnt/.gems/gems/spree-0.10.2/vendor/extensions/
 theme_default/public/images/wrapper-back-2.png to /disk1/home/slugs/
 196124_7d3212a_92f9/mnt/public/images/wrapper-back-2.png:
 (RuntimeError)
 Read-only file system - /disk1/home/slugs/196124_7d3212a_92f9/mnt/
 public/images/wrapper-back-2.png
 
 Best regards,
 Olivier
 
 -- 
 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: is it possible to allow users to use CNAME or A to point custom domains at my heroku app?

2010-06-01 Thread Keenan Brock
Hi,

1 IP address per website is too expensive. So lots of domains are hosted off 
the same IP address.

HTTP/1.1 (what we've used since ~1998) passes in a Host: parameter.

The webserver uses the Host parameter to map the request to the appropriate 
application.

We tell the webserver how to map the Host to the application.

--Keenan


On Jun 1, 2010, at 10:48 AM, Kyle Bragger wrote:

 So I just tested this out and unfortunately Chap's suggestion seems to
 be the only way; any other domain CNAME'ed to another domain pointing
 to Heroku passes though as expected, and fails, as Heroku looks for an
 app with *that* custom domain. Alas.
 
 On Jun 1, 8:21 am, Kyle Bragger kyle.brag...@gmail.com wrote:
 So you think I have to always add custom domains to the heroku account
 itself? That seems a bit convoluted (albeit very clever), and I wonder
 if there are hard limits on how many custom domain names you can
 have.  Would you need to CNAME foobar.com *and*www.foobar.comto
 proxy.heroku.com then?
 
 On Jun 1, 8:11 am, Chap chapambr...@gmail.com wrote:
 
 
 
 Here's how I've done it.
 
 Add the custom domain to the heroku app (for now I'm just doing it by
 hand, but you could probably include the heroku gem and do it during
 the account creation) and then point the www cname of the custom
 domain to a subdomain of your app (foobar.example.com).
 
 Basically how Shopify does it:http://wiki.shopify.com/DNS
 
 On May 31, 11:23 pm, Kyle Bragger kyle.brag...@gmail.com wrote:
 
 If I've got a Heroku app at example.com, and have turned on wildcard
 subdomains (foo.example.com, etc.), is it currently possible to
 support the following scenario:
 
 - I have a profile at kyle.example.com
 - I register foobar.com
 - I turn on use custom domains in the app and set my custom domain
 to foobar.com
 
 How would I configure DNS for this scenario? I've got A records for
 example.com to point to Heroku's servers, andwww.example.comCNAME'ed
 to proxy.heroku.com, but where would I point foobar.com?
 
 -Kyle
 
 -- 
 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: MySQL -- Postgres LIKE find error

2010-05-25 Thread Keenan Brock
Edoardo,

1.  you may do well to store the id as a string
you can index that, and many databases will use an index with a like clause 
(given the % is on the right hand of the string)

only way I know how to create this is using:
  def after_create
if id_string.blank?
  id_string=id.to_s
  save
end
  end


2. it may be too late in the game, but there is this concept of internal and 
external ids

the internal id is the integer you use in your join tables.
the external id is the string/number you use to refer to this record to other 
people.
the external id is the one in the url, and possibly the only one the customer 
knows.

example: first initial, last 4 letters of their name and a sequence ( ezari005 )
the url would use that for /people/ezari005
Or you could use the user chosen id for the url. twitter does this.

if you make the field fixed length and non-nullable, you could get some 
optimization for the indexing. (that is assuming a system generated index)

Accessing the record may be 1 extra lookup or may not.
def to_param is your friend, but there is also a great plugin out there they 
mentioned on rails envy a while back (called the ruby show now)



If you already have the ids released into the wild, may be no turning back.

Best of luck,
--Keenan
On May 25, 2010, at 3:09 AM, edoardoz wrote:

 Thank for your answer.
 
 The business case is to search documents by incomplete (user
 submitted)
 id.
 
 Due this case is managed out-of-the box by mysql, and we have many
 cases like this,
 it's possible to enable implicit casting even in heroku's postgres?
 
 Regards.
 
 On May 24, 11:42 pm, Jonathan Dance j...@norbauer.com wrote:
 In Postgres, you can only do string searches on string columns. Your options
 are thusly:
 
 1. Stop doing this. Do you really want to be searching an integer like a
 string?
 2. Convert ID to a string column. You shouldn't do this either, unless id
 was just an example.
 3. Tell Postgres to cast it to a string before running the LIKE clause. This
 should work in MySQL as well - MySQL was doing it implicitly, but you must
 do it explicitly in Postgres:
   :conditions = CAST(id AS char) LIKE '80%'
 
 You shouldn't do this either, as it's a slow operation, although Postgres
 (but not MySQL) does allow indexing on derived columns. Note that I've set
 the character limit to 8 on the string cast here to limit the size of the
 index:
 
 CREATE INDEX id_string_idx ON documents ((CAST(id AS char(8;
 
 --wuputah
 
 
 
 
 
 On Mon, May 24, 2010 at 1:42 PM, edoardoz edoardo.z...@gmail.com wrote:
 Something that work perfectly in my app with MySQL:
 
 Document.find(:all,:conditions = [id LIKE ?,80%])
 
 isn't working with PostgreSQL 8.3 in Heroku:
 
 ActiveRecord::StatementInvalid: PGError: ERROR:  operator does not
 exist: integer ~~ unknown
 LINE 1: SELECT * FROM documents WHERE (id LIKE E'D%')
  ^
 HINT:  No operator matches the given name and argument type(s). You
 might need to add explicit type casts.
 : SELECT * FROM documents WHERE (id LIKE E'D%')
 
 Something happened to type casting: what to do?
 
 Regards.
 
 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.
 
 --
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group 
 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.
 

-- 
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: Rails 2.3.6

2010-05-25 Thread Keenan Brock
Two things you may want to keep in mind:

People mentioned rails 2.3.4 - 2.3.5 breaking a number of tests.
I think Rails 2.3.7 is just around the corner.

--Keenan

On May 25, 2010, at 12:26 PM, Matthew A. Brown wrote:

 Hmm, interesting. I still haven't been able to get Heroku to install
 rails 2.3.6 from the manifest after multiple attempts.
 
 Anyone else? I would assume Rails 2.3.6 should be hitting the
 installed-gems pretty soon?
 
 On Mon, May 24, 2010 at 23:40, Steve Wilhelm st...@studio831.com wrote:
 I was receiving the following error from Authlogic 2.1.4 with Rails
 2.3.5.
 
 .../.gems/gems/authlogic-2.1.4/lib/authlogic/session/callbacks.rb:
 69:in `included': undefined method `singleton_class' for
 Authlogic::Session::Base:Class (NoMethodError)
 
 Author suggests upgrading to Rails 2.3.6, so I added
 
 rails --version 2.3.6
 
 to the top of my .gems file. It took a little while, but heroku
 eventually loaded the rails gems and it solved the Authlogic problem.
 
 - Steve W.
 
 
 On May 23, 9:21 pm, Matthew A. Brown mat.a.br...@gmail.com wrote:
 For what it's worth, I added all of the individual components to the
 .gems manifest above the call to Rails itself -- all the components
 installed fine, but it still timed out trying to install the
 metapackage. Weird.
 
 On Sun, May 23, 2010 at 19:12, Matthew A. Brown mat.a.br...@gmail.com 
 wrote:
 
 Hi all,
 
 Ran into a problem with gem dependency resolution that I wasn't able
 to easily solve without just updating everything to the latest,
 including Rails to 2.3.6. However this doesn't appear to be installed
 by default on alpine and when I put it into my .gems manifest, it
 seems to just sit forever when trying to install it. Anyone else had
 any luck with 2.3.6 on alpine?
 
 Thanks,
 Mat
 
 --
 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.
 
 
 
 -- 
 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: hosting app on root domain?

2010-05-19 Thread Keenan Brock
John,

Yea, strike the MX record comment.

Heroku used to be CName based, which proved tricky for MX records on a root 
level domain.
They have since given us ip addresses, so we can do A records, so it is no 
longer an issue.

Thanks again awesome Heroku crew for fixing this so we can do all sorts of 
wonderful stuff with your domain.

--Keenan

On May 19, 2010, at 7:56 PM, Jonathan Dance wrote:

 You can add MX records to the Zerigo DNS or, of course, your own DNS host. I 
 don't believe these disturb the Heroku-Zerigo integration if you're using 
 that.
 
 I usually recommend people use Google Apps ( www.google.com/a/ ) for their 
 domains - its free and usually meets people's needs.
 
 --wuputah
 
 On Wed, May 19, 2010 at 5:02 PM, Keenan Brock kee...@thebrocks.net wrote:
 John,
 
 Also don't forget.
 
 Hosting the root is easy
 Hosting the email portion (aka MX record) has proven a little more tricky.
 
 I have not used Zerigo DNS.
 I'm moving from godaddy to namecheap this month hoping that will resolve the 
 issues.
 
 --Keenan
 
 On May 19, 2010, at 4:16 PM, Oren Teich wrote:
 
  Hi John,
 
  http://docs.heroku.com/custom-domains#dns-setup
 
  We have 3 IP addresses you setup your A records to point at for root DNS.
 
  Oren
 
  On Wed, May 19, 2010 at 5:00 AM, johnb john.bey...@gmail.com wrote:
  Has anyone found a nice way to host an app on a root domain being as
  you can't create an empty cname record?
 
  For example I want to run on myapp.com and not www.myapp.com - I can
  setup redirects from myapp.com to www.myapp.com in my domain control
  panel but I can't figure out a way to run my app on myapp.com
 
  thanks,
 
  john.
 
  --
  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.
 
 
 --
 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.

-- 
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: Do you pay for multiple apps, or only multiple dynos per app?

2010-05-17 Thread Keenan Brock
Hello Brian,

You want to have one code base that is hooked up to 2 heroku apps. (staging, 
production)
Each of the heroku apps gives you 1 dyno for free.


I like the article at: 
http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html
(see also: 
http://stackoverflow.com/questions/1279787/staging-instance-on-heroku )

There were a number of examples out there, but I'm having trouble tracking it 
down.

The take away is that your local repo is connecting to a number of remotes: 1 
of which is staging, 1 is production, and optionally, another could be github, 
or any other remote repo.

--Keenan

On May 17, 2010, at 2:44 PM, Brian wrote:

 I currently have one app running with one dyno in production env. I'd
 like to create a staging one too, but am not sure if I can do that,
 with one dyno and its still free, or if I'll now have to pay for a 2nd
 dyno.
 
 thanks,
 Brian
 
 -- 
 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: Deploying with Bundler from private repos on GitHub

2010-05-12 Thread Keenan Brock
Hi Fredrik,

I think you can checking in the gem archive directory with the .gem archives.
so in theory, you can check in all the files you need.


Not sure the religious implications of that though.
Whether is is a good idea or bad.

It sounded like it bought you some speed boosts too.

--Keenan

On May 12, 2010, at 5:49 PM, Pedro Belo wrote:

 Not at this moment, unfortunately.
 
 But there is probably one or another way around this issue, we'll keep
 you guys updated.
 
 
 
 
 On Tue, May 11, 2010 at 1:33 AM, fbjork fredrik.bj...@gmail.com wrote:
 Hi all,
 
 Is it possible to deploy to heroku using bundler if i'm using the :git
 directive for gems that are in a private repo on GitHub?
 
 Regards,
 
 Fredrik
 
 --
 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.
 

-- 
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: development works fine but production on heroku complain about caling count on []

2010-05-12 Thread Keenan Brock
Adam,

When we run centos, it only has ruby 1.8.5.  And [].count is not defined.

But unsure why heroku would fail on this - thought they were running 1.8.7 (or 
newer depending upon your stack)

Maybe monkey patching is your friend?

--Keenan

On May 10, 2010, at 10:37 PM, adam wrote:

 My heroku app is tripping over code at the point where i try to do a
 count on an empty array. But in development on my local machine with
 the very same database and code (taps db:pull) it doesnt trip up.
 
 can anyone tell me why this is? im using ruby 1.8.7 and rails 2.3.2
 
 below is the offending line which produces the error NoMethodError
 (undefined method `count' for []:Array):
 
 
 @recently_checked_sentences_count =
 @user.checked_sentences_since_last_login.count
 
 with method below
 
 def checked_sentences_since_last_login()
self.sentences.checked.find(:all, :conditions = [checked_at
 ?, last_login_at])
  end
 
 which uses named_scope
 
 named_scope :checked,  lambda{|limit| { :limit = limit, :order =
 checked_at DESC, :conditions = checked_at IS NOT NULL } }
 
 
 -- 
 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: sharing app on multiple machines

2010-05-11 Thread Keenan Brock

On my iPhone,
Sorry if this was already addressed.

Github is free for public archives. Which works for many.
As you mentioned, They also have a paid option if you want private  
repos and other options.


If you google: github Heroku workflow, there are a number of examples  
of how to use git and multiple repos. (regardless of whether you  
choose github or any other provider)


When I started, I had multiple computers using Heroku as my git remote  
server.

It worked much the same way that svn works.

The disadvantage being that every time I checked in code, it would  
deploy. So I was forced to only check in working code.


Later, I started storing my code on github or company hosted git repo.  
Only pushing to Heroku to deploy.


Sticking to one remote git repo (on heroku) may meet your needs.

The neat thing about git is if you pick another hosting provider, you  
won't loose anything since all history is local. Pushing to a new  
provider will include all history (unlike svn).


Best of luck,
Keenan

On May 11, 2010, at 3:07 PM, dan mr.dan.ma...@gmail.com wrote:


i was originally going to use github when someone suggested gitosis,
since its free
it felt a little funny having to pay for something that im really only
using for me, not a team or anything
the benefit is that id be more proficient at git (if thats considered
a marketable skill then it may be worth it)
but im not sure how to setup my project to support both heroku git and
my own personal git

--
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: Time zone issue, Rails 3 - Time.zone = set, but heroku still using local server time

2010-05-03 Thread Keenan Brock
Hi Daryl,

I'm still living in 2.3 land, but one thing I often see is using Time.now vs 
Time.zone.now

Also, in test_helper (not sure the rails 3.0 equivalent), I needed to set a 
default Time.zone - otherwise the Time.zone is nil, so Time.zone.now throws 
exceptions

--Keenan
On May 3, 2010, at 1:30 AM, Daryl wrote:

 Hey there herokuistas,
 
 So, I'm using Rails 3.0.0.beta3 and am trying to get the default time
 in my app to be London while the servers, as you know, are on Pacific
 time (I'm in Aus myself).
 
 I've set the application_controller.rb to have a before filter which
 sets the timezone and then sets that to London (I still want AR to
 write to the DB in UTC, so have not touched the environment/
 application.rb).
 
 ===
  before_filter :set_timezone
 
  def set_timezone
Time.zone = 'London'
  end
 ===
 
 Checking heroku console `date` *still* shows the machines on Pacific
 time, as does a check of the code when I got there (it should show
 Monday but instead stuck on Sunday at the mo).
 
 Can anyone tell me what I need to do to get the code to see this as
 London time ?
 
 Also, I've asked the fine folks at heroku to reset the daily cron to
 go off at 1.15am London time and just wondering if changing this
 setting to London time will then affect that daily cron job kicking
 off.
 
 Any help appreciated! A bit stumped here. Thanks !
 Daryl.
 
 -- 
 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: Using Time.now in AR#find :conditions - not working correctly?

2010-04-20 Thread Keenan Brock
I really like the way this was written up in DelayJob / job.rb


def self.db_time_now
  if Time.zone
Time.zone.now
  elsif ActiveRecord::Base.default_timezone == :utc
Time.now.utc
  else
Time.now
  end
end

FWIW/
--Keenan
On Apr 20, 2010, at 2:01 PM, Matthew A. Brown wrote:

 The usual approach with ActiveRecord is to treat datetime columns as
 time-zone-less -- in other words, regardless of whether postgres has
 an internal idea of time zone, you interpret the values of those
 columns in whatever time zone makes sense.
 
 To make that less of a pain, many applications set ActiveRecord to
 persist all timestamps as UTC -- this is just a configuration setting
 you can put into your environment.rb:
 
ActiveRecord::Base.default_timezone = :utc
 
 Then, whenever you're doing time-based queries, you need to remember
 to cast the time in question to UTC. One could make the argument that
 ActiveRecord should do this for you, or that it shouldn't, but either
 way it doesn't, so it's just something you have to remember to do in
 your code.
 
 Naturally, operations that assume that your idea of a time zone and
 the database's are the same -- such as performing a query with NOW()
 -- are going to cause you problems; but since you're probably building
 all your queries in Ruby anyway, it's easy enough to avoid those
 situations.
 
 Mat
 
 On Tue, Apr 20, 2010 at 13:39, Matthew Moore m3mo...@gmail.com wrote:
 I have a model that I'm trying to do a find along with conditions that
 rely on Time.now.
 
 When I run 2 simple queries, one with created_at = Time.now, and one
 without, I expect to find the exact same record (because no new posts
 have been created in between these calls).
 
 But I get different results --
 
 Here's my output:
 Time.now
 = Tue Apr 20 10:38:01 -0700 2010
 Time.now.utc # For verification purposes
 = Tue Apr 20 17:38:05 UTC 2010
 Post.find(:first, :conditions = ['created_at = ?', Time.now], :order = 
 'created_at DESC')
 = #Post id: 7835, created_at: 2010-04-20 05:46:03, updated_at:
 2010-04-20 05:46:03
 Post.find(:first, :order = 'created_at DESC')
 = #Post id: 7866, created_at: 2010-04-20 17:17:26, updated_at:
 2010-04-20 17:17:26
 
 
 Is this because the Timezone of the server is set wrong?  Something
 funky with Postgres?
 
 --
 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.
 

-- 
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: Suggestion: Make db:push a little safer

2010-03-25 Thread Keenan Brock
I have something like the following defined

desc 'prompt are you sure'
task :are_you_sure do
  unless ENV['FORCE'] == 'true'
puts 
puts THIS WILL BLOW AWAY THE DATABASE
puts hit enter to continue (control c to abort)
puts 
STDIN.read(1)
  end
end

task :refresh = %w(are_you_sure db:pull db:convert db:test:prepare)

rake db:refresh prompts
rake db:refresh FORCE=true does not

Or if you wanted to require FORCE=true, you can do the following:

desc 'require force param'
task :require_force do
  raise This modifies production. To run, please specify FORCE=true unless 
ENV['FORCE'] == 'true'
end


--K

On Mar 25, 2010, at 11:12 AM, Mike Doel wrote:

 On Mar 25, 2010, at 10:55 AM, Sean Schofield wrote:
 
 I'm loving the heroku db:pull stuff but its a bit dangerous if you
 accidentally run db:push on a production system.  Would it be possible
 to have db:push warn you that the remote database is not empty?  Maybe
 something like the following:
 
 WARNING: Remote database is not empty.  Are you sure you want to
 replace its contents with the contents of your local database?  If so
 please use heroku db:push with the --force option.
 
 We tend to use rake tasks for pushing/pulling instead of using the heroku gem 
 directly.  Something like:
 
 namespace :db do
  task :refresh = ['db:pull','db:convert','db:test:prepare']
  task :pull = [:drop, :create] do
system 'heroku db:pull'
  end
 
  # Include in here any rake tasks needed to seed or modify data for
  # current iteration
  task :convert = ['db:migrate']
 end
 
 That's for pulling instead of pushing (now that we're live, we never push - 
 only migrate/convert).
 
 Once you get in the habit of doing 'rake db:refresh' instead of 'heroku 
 db:pull', it becomes natural.
 
 You could build a rake task that wraps db:push and warns you before doing its 
 thing.
 
 Mike
 
 -- 
 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: Taps Server Error: year too big to marshal when doing a db:pull

2010-02-15 Thread Keenan Brock
Hello Paul,

It looks like you have a record with a year too big for sqlite.
I have run into this in non rails situations importing year '9' to MSSql - it 
was a bug in my code that did not add 2000

Looks like you only have 2 tables to choose from (users, payments, credits and 
streams were successful).

From heroku console query for all records bigger than this year. That may shed 
some light

 Record.scoped(:conditions = date_field  '#{DateTime.now + 10.years}') 
 #single then double
# May want to try less then 100 years before now too

Winging that, but hope it helps

--Keenan

On Feb 15, 2010, at 8:11 PM, Paul Leader wrote:

 I've been trying to pull a copy of my database for local debugging,
 but every time I try I get the following error:
 
 Auto-detected local database: sqlite://db/development.sqlite3
 Receiving schema
 Receiving data
 6 tables, 4,665 records
 users: 100% |==| Time:
 00:00:01
 payments:  100% |==| Time:
 00:00:00
 credits:   100% |==| Time:
 00:00:00
 streams:   100% |==| Time:
 00:00:00
 !!! Caught Server Exception==  | ETA:
 00:00:00
 [warning] The response contained in an RestClient::Exception is now a
 RestClient::Response instead of a Net::HTTPResponse, please update
 your code
 Taps Server Error: year too big to marshal
 
 
 Has anyone seen this sort of thing before, and have you any idea what
 I can do to fix it?
 
 Also, I've updated all my gems to the latest versions, but I still get
 that warning, which suggests that Taps/Heroku client need updating.
 
 Paul
 
 -- 
 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: A key is required to write a cookie containing the session data.

2010-02-09 Thread Keenan Brock
Hey Chaz,

for rails apps,

config/initializers/session_store.rb usually has a secret key

ActionController::Base.session = {
  :key = '_charles_session',
  :secret  = 'XX'
}

you can get a good session key by running:
rake secret

Create the file and see how it goes.

--Keenan

On Feb 9, 2010, at 12:23 AM, Charles M Magid wrote:

 Thank you very much in advance for any and all help on this.
 
 Symptom:
 
  The app http://hope-for-the-future.heroku.com/ returns 'App failed
 to start' on load.
 
  See Pastie: http://pastie.org/815793 for trace
  github: http://github.com/trevorturk/static  See deployment to
 heroku 2/3 of the way down the page
 
  Error message:
 
cookie_store.rb:163:in `ensure_session_key':   A key is required
 to write a cookie containing the session data.   Use
 config.action_controller.session =   { :key =
 _myapp_session, :secret = some secret phrase }   in config/
 environment.rb (ArgumentError)
 
 
 Briefly:
 
  I am using 'static' CMS by trevorturk / static on github and using
 the heroku deployment instructions.
 
  The app works locally so I hoped it would just deploy, even though
 there were directions on deploying to heroku I didn't groke, ie:
 
  ...
  mate config/config.yml # configure the production environment
  rake s3:create
  rake heroku:config
  ...
  heroku rake db:schema:load
  ...
 
  Above may be a red herring.
 
 
 Seems like the following lines need to be changed, but to what and
 where is the doc on this?
 
  environment.rb has the following lines:
 
config.action_controller.session = {
  :key = CONFIG['session_key'],
  :secret = CONFIG['session_secret']
}
 
 Is this a red herring?
 
 Thank you in advance again,  your most appreciative booster.
 
 Charles Magid
 
 -- 
 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: dns wtf for .it domain

2010-02-08 Thread Keenan Brock
Hello Shane,

it takes a little time for these things to propagate across the internet. 
Sometimes up to 3 days.
And to make it worse, your computer, your router, and possibly your hosting 
provider all cache the records. So it is tricky to know once you got it right.

I tried the url and got the parked domain too.

I tried to query your dns server directly, and am probably doing it wrong, but 
got back the old ip address: 119.252.176.38

% host razzledazzle.it ns1.instradns.com

I'm guessing I have some user error, and may be running the wrong command. But 
do check if you need to click 'confirm' or 'save' in the dashboard.

Best of luck,
Keenan

On Feb 9, 2010, at 12:03 AM, Shane Becker wrote:

 the heroku app (behind a password)
 http://razzledazzleit.heroku.com
 
 the desired domain
 http://razzledazzle.it
 
 the dns setup with the registrar (whose dashboard sucks a lot)
 http://skitch.com/veganstraightedge/nwmhn/european-domain-names-europe-registry
 
 host name  |  ip address
 razzledazzle.it 75.101.163.44 
 razzledazzle.it75.101.145.87  
 razzledazzle.it174.129.212.2
 
 i'm still getting the parked domain page from them. any ideas?
 
 thanks
 shane
 
 
 still vegan. still straightedge.
 shane becker
 +1 801 898-9481
 blog: http://iamshane.com
 shirts: http://theresistancearmy.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: flush memcached?

2010-01-23 Thread Keenan Brock
Hi,

You can try
ActionController::Base.cache_store.clear

That is assuming that you have assigned your memcache to the cache_store.

--Keenan

On Jan 23, 2010, at 5:08 PM, walker wrote:

 Is there a way to flush the memcached cache for your app? I have some
 bad page data (my own fault, was playing around with some stuff) and
 would like to just clear everything out.
 
 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.
 

-- 
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: Nesta

2009-12-29 Thread Keenan Brock
Hi,

As an alternative, you may want to keep the hit directory around

git co -b production #create a Heroku branch
git remote add heroku git:// ... Heroku ...

You will need to setup the default destination for this branch (I  
defer to what ever suggestions the git command provides)

Make sure you checking your Heroku specific changes under the  
production branch, not master.

This way you can pull/push changes for the community to enjoy.

When I was working with lovdbyless, I wish I had branched earlier. It  
is a little tricky merging in the code changes to master that are  
appropriate for the rest of the nests community, but it will be a good  
lesson in selective merging. (I'd give advice but I failed the lesson  
and ended up just keeping 2 different directories around)

Best of luck.
Keenan

On Dec 26, 2009, at 7:13 PM, jd j...@vauguet.fr wrote:

 Hi. Just a quick note for those using or willing to use Nesta on
 Heroku: you must disable the caching system, so you may replace

 set :cache_enabled, Nesta::Configuration.cache

 in app.rb by:

 configure :production do
  # this will be runned at heroku's dyno startup

  # let's disable Nesta's caching system so Heroku's happy
  set :cache_enabled, false
 end

 I'd recommend the following process to set up a Nesta instance on
 Heroku:
 1. git clone nesta from github
 1.bis cd inside
 2. remove the .git directory and .git_ignore
 3. create a fresh git repos: git init, git add ., git commit -am
 fresh start
 4. create your new project on Heroku: heroku create your_project
 4.bis update config/config.yml and do not forget to set cache to false
 in the production section
 5. push from your machine to Heroku: git push heroku master
 6. Start managing your content in Nesta, then git commit -am … and
 git push heroku master when you're ready, and so on.

 NB: Nesta is a simple CMS engine built on top on Sinatra (http://
 effectif.com/nesta). Kind of a _why feeling to it, doesn't get in your
 way. And with Mustache, publishing's a cinch!

 --

 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: How can I disable models and/or tweak config.load_paths?

2009-12-03 Thread Keenan Brock
Why not try app/models_legacy/
That is not included by default in rails. so you could get a difference.

Best of luck,
Keenan
On Dec 3, 2009, at 11:26 AM, Patrick Crowley wrote:

 My app won't launch because it has some Legacy models that rely on
 a :legacy database adapter.
 
 I have no intention to use these models in production -- they're only
 used to migrate legacy content. So my plan is to just run my legacy
 migration rake task in development, migrate all legacy data, and then
 push the data to my Heroku app.
 
 Sure, the easy fix would be to just ditch the models entirely, but
 realistically I'll need to migrate legacy data repeatedly until the
 app is completed and launched publicly.
 
 So how can I tell Heroku to ignore these models?
 
 I've tried this:
 config.load_paths += %W( #{RAILS_ROOT}/app/models/legacy ) unless
 RAILS_ENV == 'production'
 
 But Heroku seems to ignore it.
 
 --
 
 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: db:push unable to find taps

2009-12-02 Thread Keenan Brock
HEy Chris,

For a while I noticed that taps created invalid urls that contain a password. I 
think the url encoding would screwup with the : (between username/password) or 
something like that.

I used to manually create the url and all would work.

It has been a while since I've been on that project, so sorry I'm a bit vague.

--Keenan

On Dec 2, 2009, at 5:14 PM, Chris Baglieri wrote:

 One step closer.  I was able to find a lingering heroku gem library
 (1.2.1) lying around.  I removed it from my system and I am not
 getting another error saying invalid database URL.  At least it
 appears to be working now.  I should be good to go from here.  If I do
 run into any other issues, I'll cover it elsewhere.  Thanks for the
 help.  David, you rock, as I believe you were also the one who stepped
 up on the IRC channel.
 
 Cheers!
 
 On Dec 2, 5:03 pm, Chris Baglieri chris.bagli...@gmail.com wrote:
 $ ruby -v
 ruby 1.8.6 (2009-03-31 patchlevel 368) [i686-darwin10.0.0]
 
 Getting somewhere now.  David, I made the change you suggested and
 there was nothing different in terms of what was displayed.  I then
 commented out the error message outright and it still was shown when I
 issued the command,  I uninstalled and readded the heroku gem but
 maybe it is lingering elsewhere on my machine.  Let me see if I can
 find it.
 
 On Dec 2, 4:57 pm, David Dollar da...@heroku.com wrote:
 
 
 
 Try changing that
 
 rescue LoadError
 
 to
 
 rescue LoadError = ex
   puts ex.inspect
 
 to get a better idea of what is failing to load.
 
 - David
 
 On Wed, Dec 2, 2009 at 4:55 PM, Chris Baglieri 
 chris.bagli...@gmail.comwrote:
 
 Installed the latest heroku gem and still no luck.  Any thoughts would
 be appreciated.
 
 foo$ heroku version
 heroku-gem/1.4
 
 foo$ taps version
 0.2.22
 
 foo$ heroku db:push
 Install the Taps gem to use db commands. On most systems this will be:
 sudo gem install taps
 
 This is where the error appears to be thrown (/opt/local/lib/ruby/gems/
 1.8/gems/heroku-1.4/lib/heroku/commands/db.rb for me):
 
 def initialize(*args)
  super(*args)
  gem 'taps', '= 0.2.8', ' 0.3.0'
  require 'taps/client_session'
   rescue LoadError
  error Install the Taps gem to use db commands. On most systems
 this will be:\nsudo gem install taps
 end
 
 On Dec 2, 1:47 pm, Morten Bagai mor...@heroku.com wrote:
 Actually, the current gem version is 1.4. It's on gemcutter.
 
 M
 
 On Dec 2, 2009, at 10:39 AM, Chris Baglieri chris.bagli...@gmail.com
 wrote:
 
 I'm trying to push a database and 'heroku db:push' is alerting me that
 I do not have the taps gem installed.  The step before issuing the
 heroku command, I installed taps (0.2.22) and confirmed it was there.
 I'm attempting to do this from OSX.  Someone in the IRC channel
 suggested I confirm all of taps dependencies where installed and it
 appears they are. I also updated my heroku gem (which coincidentally
 was a version behind) hoping that would make a difference.  Looking at
 db.rb, the problem is happening on initialize.  I am running
 everything out of my /opt/local/bin... directory for whatever that's
 worth.  From my command line I can issue taps commands.  Could it be
 that the heroku gem is unable to find my taps gem?  My path is below
 along with some other helpful bits:
 
 foo$ echo $PATH
 /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/opt/
 local/lib/postgresql84/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/
 bin:/usr/X11/bin
 
 foo$ gem -v
 1.3.5
 
 foo$ taps version
 0.2.22
 
 foo$ heroku version
 heroku-gem/1.3
 
 foo$ which taps
 /opt/local/bin/taps
 
 foo$ which heroku
 /opt/local/bin/heroku
 
 --
 
 You received this message because you are subscribed to the Google
 Groups Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group 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.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.
 
 --
 
 You received this message because you are subscribed to the Google Groups 
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to 
 heroku+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/heroku?hl=en.
 
 

--

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 

Re: installing gems from gemcutter not as it should be

2009-11-02 Thread Keenan Brock

Just a thought.

Are the requests to gemcutter using HTTP?
Is the system using ETags / If-Mod-since?

Seems there could be a way to use a forward proxy to gemcutter.

It would help out:
1) less bandwidth for both gemcutter and heroku
2) faster image build times on heroku
3) less load on the gemcutter servers
4) maybe less load on the heroku servers since

Another option would be to have a local repository of gems. I remember  
doing this with rpms/gentoo ports. It was a bit of a pain but as the  
number of machines increased, it really sped things up. (Especially  
when installing the software)

--Keenan

On Nov 2, 2009, at 11:51 AM, Neil Middleton wrote:


 I had this same problem last week - in the end, and on about the tenth
 push it finally managed to make it through which was a real pita.

 Something needs to be there to ensure deployments aren't
 killedwhatever that might be.

 /Neil

 On 2 Nov 2009, at 16:46, markdevilliers wrote:


 It did work for me a couple of hours later. It had also failed  
 several
 times before I posted.

 I think the issue is consistency - random gems (not always redcloth)
 were failing to install with the error message  - http://
 gemcutter.org/ does not appear to be a repository - which in the
 example above doesn't make sense as it was a repository moments
 before.

 I'll probably accept that maybe gemcutter is a bit overloaded a
 certain times and timing out delivering the initial 302 but maybe on
 the heroku side there needs to be a try a few times on push as
 failing at random stages is a bit annoying.

 Anyway I've just pushed again and all is good again,

 Thanks for looking into it for me - Mark




 


--~--~-~--~~~---~--~~
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: Installing Radiant extension

2009-09-25 Thread Keenan Brock

Hi Thomas,

for testing, sometimes I:
chmod -R 555 rails_app
chmod 755 rails_app/tmp

and I run from there

That usually allows me to recreate the problem locally and I go from  
there.

Keep the questions coming,
--K

On Sep 25, 2009, at 6:02 AM, Thomas Balthazar wrote:


 Hello John,

 Thanks a lot for your answer.
 That's exactly what I did, but the extension isn't activated on
 Heroku... :-/

 Any idea?
 Best,
 Thomas.

 On Sep 25, 5:24 am, john johnm...@gmail.com wrote:
 the update command for most extensions modifies the file system (adds
 files to public/javascripts and/or public/stylesheets) so i think
 you're hitting the read-only filesystem restriction.

 if it's working locally you can commit all of the changes the
 extension made and then run:

 git push heroku master
 heroku db:push

 which will copy all the new files (the ones from the update command)
 and copy up your database (from the migrate command).

 On Sep 23, 3:52 pm, Thomas Balthazar gro...@suitmymind.com wrote:



 Hello,

 I've successfully installed Radiant 0.8.1 on Heroku.
 Now, I'm trying to install an extension (http://github.com/tricycle/
 radiant-page-preview-extension) but I cannot manage to do it. It  
 works
 perfectly locally, just by running 'rake
 radiant:extensions:page_preview:update', but when I try to run this
 command on Heroku 'heroku rake  
 radiant:extensions:page_preview:update'
 I get the following error :
 --
 rake aborted!
 Don't know how to build task  
 'radiant:extensions:page_preview:update'
 --

 I've double-checked, and the 'page_preview' is present in my vendor/
 extensions folder.

 Any idea?

 Thanks,
 Thomas.
 


--~--~-~--~~~---~--~~
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: Git

2009-09-21 Thread Keenan Brock

(on phone and winging this. Ping if it isnt working)

If you are in the rails directory type:
git remote -v

That will say where you are hooked up

Hopefully you will see an origin or heroku

If so, try again

If not:
Find out your git url:
heroku list
heroku info --app app name

Find the git: url

git remote add heroku git url

Hope that fixes it

Also, ensure you have your ssh key setup

--Keenan




On Sep 21, 2009, at 11:21 AM, Thomas Sullivan sulliva...@gmail.com  
wrote:


 Try searching google for heroku on a proxy. I'm on the phone now
 otherwise I'd link it.



 On Sep 9, 2009, at 9:32 AM, Nemrah harmenh...@gmail.com wrote:


 Hi i installed ruby m rubygems , git and the heroku gem.

 I was following all the steps described in the docs sections of  
 Heroku
 when i walked into this error :

 fatal: 'heroku' does not appear to be a git repository
 fatal: The remote end hung up unexpectedly

 , i got it after typing the git push heroku master command.


 Whats i going wrong and what can i do to fix this ?

 Thanks ,
 Nemrah



 

--~--~-~--~~~---~--~~
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: Put an application into maintenance state

2009-09-18 Thread Keenan Brock

Thomas,

Sorry it took so long. Have been using this for a little while now but  
took a while to tear it out. Very interested in feedback.

1) put http:://github.com/kbrock/iorn_gate into plugins directory
2) add near the TOP of environment.rb
MAINTENANCE =(ENV['MAINTENANCE']=='true')

3) add to my application_controller:
   if MAINTENANCE
 acts_as_gated :template = 'shared/gate_closed', :gate_name =  
'testing123
   end

4) create 'maintenance' page to app/views/shared/gate_closed.html.erb


heroku keys:add MAINTENANCE true
git push heroku
heroku rake db:migrate
heroku open
do url:  /testing123/open
... test...
heroku keys:remove MAINTENANCE


--Keenan


On Sep 10, 2009, at 6:45 AM, Thomas Balthazar wrote:


 Hi Keenan,

 Thanks for the suggestion!

 Thomas.



 On Thu, Sep 3, 2009 at 8:59 PM, Keenan Brock kee...@thebrocks.net  
 wrote:

 Hi Thomas,

 For passenger, there is a way to say if a file is present, then
 display a maintenance page. (using mod rewrite)
 This got me thinking.

 Heroku has environmental variables. So why not use an environmental
 variable to trigger a maintenance page?

 Maybe you can add a maintenance page to your site.
 e.g.:

 setup the blocker:

 config/routes.rb: (below Routes.draw but above the other entries)
 if ENV['MAINTAIN']=='true'
   map.maintain '*path', :controller = 'application', :action =
 'show500'
 end

 -or-
 application_controller.rb
 if ENV['MAINTAIN']=='true'
   before_filter :show500
 end

 and setup the renderer:

 app/controllers/application_controller.rb
 def show500
  render :file = 'shared/maintain', :status = 500
  false
 end

 To turn it on:

 heroku config:add MAINTAIN true
 The site will say we'll be back soon
 rake db:migrate
 other stuff
 heroku config:remove MAINTAIN


 Hope this meets your needs.

 I'll throw together a plugin when I get the chance. But long weekend
 suggests I'll have other things on my plate.
 --Keenan

 On Sep 1, 2009, at 2:25 PM, geolev wrote:


 I think this would be great. Does anyone know how to do this?

 On Aug 28, 2:52 am, Thomas Balthazar gro...@suitmymind.com wrote:
 Hello,

 I'd like to know what would be the best way to put an application
 into
 maintenance state.

 I want to deploy a major update (code + db structure + data
 migration)
 on a Production app, and I'd like to be sure that users don't use  
 the
 app while I'm deploying and testing.

 As far as I know, as soon as I run 'git push heroku', the app is
 deployed and the users are able to access it.
 The problem is that I haven't run 'heroku rake db:migrate' yet, so
 the
 app that is online right now doesn't work.
 Also, once I've run 'heroku rake db:migrate', I'd like to be able  
 to
 test the app to be really sure everything is ok.
 But the users are already using the app and if I made a mistake  
 and I
 want to rollback, I can't, since users are already using the new DB
 structure.

 I know I have to test the app so it doesn't happen, I also have a
 Staging app to test everything, but, you know, sometimes things  
 still
 go wrong.

 So, what would be the best approach to achieve an application
 'maintenance' state?

 Thanks for your suggestions.

 Best,
 Thomas.







 


--~--~-~--~~~---~--~~
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: Protecting your production environment

2009-09-15 Thread Keenan Brock

Hi All,

1. Adam had posted the heroku command on git before ( 
http://github.com/adamwiggins/heroku-client 
  )
Maybe someone there can repost it?

2. I have created rake commands for most of what I do locally
e.g. rake reload runs:
rake db:reset ; rake db:migrate load:data


I run heroku comands via rake

e.g.: rake h:reload runs:
heroku db:reset ; heroku rake db:migrate ; rake h:load:data  
FILE=samples/people


if you went that route it would be quite easy to aggregate commands to  
simplify your workload. And it would give you a spot in the rake file  
to prompt

--Keenan

On Sep 15, 2009, at 4:45 AM, Neil wrote:


 At the very least I would expect some sort of This is a live
 environment - are you really, really sure you want to do this? on the
 app changing actions. (db:push, db:reset etc, similar to destroy)

 N


 On Sep 11, 3:14 pm, Carl Anderson nexus...@gmail.com wrote:
 That was something I was wondering as well. I've literally had  
 nightmares
 about doing just that (am I alone?)

 Carl

 On Fri, Sep 11, 2009 at 4:03 AM, Neil neil.middle...@gmail.com  
 wrote:

 I'm not sure if someone has already covered this, but although there
 are loads of really handy features in the Heroku gem, some of the
 functions that you can acheive are potentially very damaging to a
 production environment and also very easy to do.

 For instance, from what I've seen there is nothing to stop me from
 doing a db:push to my live application - there's no sort of question
 of confirmation etc.

 Is this something that's planned or is it something I've just not  
 seen?


 


--~--~-~--~~~---~--~~
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: Protecting your production environment

2009-09-15 Thread Keenan Brock

Oops
Scratch previous point #1

Hmm. That is odd - I searched for heroku on github and this didn't  
come up...

--Keenan
On Sep 15, 2009, at 5:09 AM, Sarah Allen wrote:


 Yeah, I actually totally munged the live DB right after we went live
 (luckily before we told anyone about the site and we had all the data
 backed up).  I agree that some kind of are-you-sure would be the right
 answer.  Kind of like 'rm -i' but on by default -- there could be a -f
 option to suppress the warning.  The gem is open source... I don't
 know offhand how to add an interactive prompt to a rake task, but I
 suppose it could be added here:
   http://github.com/heroku/heroku/blob/master/Rakefile

 I'm clearly not getting enough sleep this week, so for now I try to be
 quite cautious when I type heroku in particular directories, but
 eventually I won't be able to live with that :)

 On Sep 15, 2009, at 1:45 AM, Neil wrote:


 At the very least I would expect some sort of This is a live
 environment - are you really, really sure you want to do this? on  
 the
 app changing actions. (db:push, db:reset etc, similar to destroy)

 N


 On Sep 11, 3:14 pm, Carl Anderson nexus...@gmail.com wrote:
 That was something I was wondering as well. I've literally had
 nightmares
 about doing just that (am I alone?)

 Carl

 On Fri, Sep 11, 2009 at 4:03 AM, Neil neil.middle...@gmail.com
 wrote:

 I'm not sure if someone has already covered this, but although  
 there
 are loads of really handy features in the Heroku gem, some of the
 functions that you can acheive are potentially very damaging to a
 production environment and also very easy to do.

 For instance, from what I've seen there is nothing to stop me from
 doing a db:push to my live application - there's no sort of  
 question
 of confirmation etc.

 Is this something that's planned or is it something I've just not
 seen?




 http://www.ultrasaurus.com




 


--~--~-~--~~~---~--~~
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: Put an application into maintenance state

2009-09-03 Thread Keenan Brock

Hi GaJ

I just tested and it looks like it works the way you and I want. (it  
is additive so you can just specify the one variable)

Not sure when they fixed it, but sure enough - we're all set on this  
one.

--Keenan

On Sep 3, 2009, at 11:26 PM, GreenAsJade wrote:


 It's a nice idea.

 One small fly in the ointment is that you can't individually set
 heroku configuraiton variables (unless this is fixed now?)

 Certainly last time I tried it, I found that any env var not set
 explicitly on the same config:add statement was removed.  IE
 config:add is not additive.

 This means that to implement the suggestion above, you would have to
 ensure that each time you turn on and off MAINTAIN you will have to be
 setting all the other vars as well.  A royal PITA.

 GaJ


 On Sep 4, 3:59 am, Keenan Brock kee...@thebrocks.net wrote:
 Hi Thomas,

 For passenger, there is a way to say if a file is present, then
 display a maintenance page. (using mod rewrite)
 This got me thinking.

 Heroku has environmental variables. So why not use an environmental
 variable to trigger a maintenance page?

 Maybe you can add a maintenance page to your site.
 e.g.:

 setup the blocker:

 config/routes.rb: (below Routes.draw but above the other entries)
 if ENV['MAINTAIN']=='true'
map.maintain '*path', :controller = 'application', :action =
 'show500'
 end

 -or-
 application_controller.rb
 if ENV['MAINTAIN']=='true'
before_filter :show500
 end

 and setup the renderer:

 app/controllers/application_controller.rb
 def show500
   render :file = 'shared/maintain', :status = 500
   false
 end

 To turn it on:

 heroku config:add MAINTAIN true
 The site will say we'll be back soon
 rake db:migrate
 other stuff
 heroku config:remove MAINTAIN

 Hope this meets your needs.

 I'll throw together a plugin when I get the chance. But long weekend
 suggests I'll have other things on my plate.
 --Keenan

 On Sep 1, 2009, at 2:25 PM, geolev wrote:



 I think this would be great. Does anyone know how to do this?

 On Aug 28, 2:52 am, Thomas Balthazar gro...@suitmymind.com wrote:
 Hello,

 I'd like to know what would be the best way to put an application
 into
 maintenance state.

 I want to deploy a major update (code + db structure + data
 migration)
 on a Production app, and I'd like to be sure that users don't use  
 the
 app while I'm deploying and testing.

 As far as I know, as soon as I run 'git push heroku', the app is
 deployed and the users are able to access it.
 The problem is that I haven't run 'heroku rake db:migrate' yet, so
 the
 app that is online right now doesn't work.
 Also, once I've run 'heroku rake db:migrate', I'd like to be able  
 to
 test the app to be really sure everything is ok.
 But the users are already using the app and if I made a mistake  
 and I
 want to rollback, I can't, since users are already using the new DB
 structure.

 I know I have to test the app so it doesn't happen, I also have a
 Staging app to test everything, but, you know, sometimes things  
 still
 go wrong.

 So, what would be the best approach to achieve an application
 'maintenance' state?

 Thanks for your suggestions.

 Best,
 Thomas.
 


--~--~-~--~~~---~--~~
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: Resetting the database

2009-08-28 Thread Keenan Brock

$ heroku rake db:reset
 already exists
rake aborted!
no such file to load -- /home/slugs/43604_014bb44_7d48/mnt/tmp/schema.rb

(See full trace by running task with --trace)
(in /disk1/home/slugs/43604_014bb44_7d48/mnt)
Couldn't drop  : #ActiveRecord::StatementInvalid: PGError:  
ERROR:  must be owner of database 
: DROP DATABASE IF EXISTS 


Instead I wrote:

namespace :db do
   desc 'drops all tables and resets migrations to nothing'
   task :reset = :environment do
 ActiveRecord::Base.connection.tables.each {|t|  
ActiveRecord::Base.connection.drop_table(t) unless  
t=='schema_migrations' }
 if ActiveRecord::Base.connection.respond_to? :truncate
   ActiveRecord::Base.connection.truncate('schema_migrations')
 else
   ActiveRecord::Base.connection.delete('delete from  
schema_migrations')
 end
   end

   desc 'recreate the database and populate it'
   task :reload = %w(db:reset db:migrate) # annotate_models

   desc 'annotates the models and dumps the schema'
   task :doc = %w(db:migrate annotate_models db:schema:dump)
end

On Aug 27, 2009, at 12:44 PM, Ryan Tomayko wrote:


 On Thu, Aug 27, 2009 at 7:54 AM, Keenan Brockkee...@thebrocks.net  
 wrote:
 Hi All,
 How do I wipe out a database and start from scratch on heroku?
 Locally I run:
 rake db:migrate:reset
 (essentially db:drop db:create db:migrate)
 Unfortunately, rake db:migrate VERSION=0 doesn't quite do what I want

 a) Is there a better command?
 -or-
 b) Is it possible for someone at Heroku to implement a db:drop that  
 clears
 the database?
 Thanks for any insight,
 Keenan

 Running heroku db:reset will reset the app's database to a blank
 slate. You'll need to run migrations or use heroku db:push to
 reinitialize afterward.

 Thanks,
 Ryan

 


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



Resetting the database

2009-08-27 Thread Keenan Brock
Hi All,

How do I wipe out a database and start from scratch on heroku?

Locally I run:

rake db:migrate:reset
(essentially db:drop db:create db:migrate)

Unfortunately, rake db:migrate VERSION=0 doesn't quite do what I want


a) Is there a better command?
-or-
b) Is it possible for someone at Heroku to implement a db:drop that  
clears the database?

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



Re: Workflow for compressing JavaScript and CSS using YUI Compressor prior to deployment

2009-08-13 Thread Keenan Brock
Hi Grant,

I was about to write a follow up on that one - I'm pretty sure they do  
not have Java installed.

I was quick to jump the gun and show how to generate content and serve  
it up. After I looked at the project I realized the java predicament.

http://compressorrater.thruhere.net/ points to a couple. Looks like  
jsmin has been ported to ruby - so that would work. disclaimer: I have  
only heard the name and have not used.

but for the static libraries, it does seem that serving up a minified  
version (or the minified version hosted on google) may be a great route.


--Keenan

On Aug 13, 2009, at 11:36 PM, Grant Heaslip wrote:

 Thanks Keenan.

 Does Heroku have Java installed on their servers (YUI Compressor  
 runs on Java)? If not, any suggestions on other compressors to look  
 into?

 On Thu, Aug 13, 2009 at 10:29 PM, Keenan Brock  
 kee...@thebrocks.net wrote:
 I was able to put some files into tmp/generated and ln -s from  
 public to the tmp directory. I did git check in the link

 Generate to tmp generated

 You could link individual files or have a whole directory like  
 scripts/generated link to tmp/generated

 --K


 On Aug 13, 2009, at 2:32 AM, Grant Heaslip m...@grantheaslip.com  
 wrote:

 I previously used a great Rails plugin called yui_compressor_fu 
 (http://github.com/maxim/yui_compressor_fu/ 
 ) to combine and compress my JavaScript and CSS the first time it  
 was loaded in production, but since Heroku doesn't allow access to  
 the filesystem, I need to figure out a new solution.

 The main problem is that I'd prefer to not be checking the  
 compressed JavaScript into my git repository, but since I'm  
 deploying from git I'm not sure there's any way around it.

 Does anyone have any clever solutions for this?

 Thanks,

 Grant






 


--~--~-~--~~~---~--~~
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: herokugarden is down again

2009-08-07 Thread Keenan Brock

I used this as an opportunity to finally move my app to Heroku

Took  5 minutes



On Aug 7, 2009, at 7:48 AM, nacho na...@yestoall.com wrote:

 my application in herokugarden doesn't work

 --  
 // nacho

 

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



  1   2   >