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

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

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

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

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

2012-11-19 Thread Keenan Brock
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

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

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

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,

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

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

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

Re: Deploying to Cedar

2012-04-11 Thread Keenan Brock
...@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

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

Re: Scalability of Heroku worker job with external network connection

2012-04-02 Thread Keenan Brock
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

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'

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,

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

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

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

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

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

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

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

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.

Re: Anyone having trouble using heroku console?

2011-07-14 Thread Keenan Brock
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

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

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

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

Re: Git commands within app

2011-05-11 Thread Keenan Brock
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Re: Wildcard subdomains with GoDaddy

2010-12-20 Thread Keenan Brock
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

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:

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

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

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

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

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?

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

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

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

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

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

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

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

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

Re: how to setup mime-type in my rails app

2010-06-24 Thread Keenan Brock
://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

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

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:

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 #

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

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

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:

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,

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

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

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

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

Re: hosting app on root domain?

2010-05-19 Thread Keenan Brock
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

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:

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

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

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

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

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,

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 =

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

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

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

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

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

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

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

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

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

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:

Re: Put an application into maintenance state

2009-09-18 Thread Keenan Brock
: /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

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

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

Re: Put an application into maintenance state

2009-09-03 Thread Keenan Brock
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

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:

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

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

2009-08-13 Thread Keenan Brock
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

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

  1   2   >