Re: Can't deploy Rails 2.3.8 Apps to heroku
You need to deploy it to the Bamboo stack, not to the default Aspen stack. Aspen comes with Ruby 1.8.6, Rails 2.3.8 needs >= Ruby 1.8.7. I'd recommend REE 1.8.7, as Ruby 1.9.1 is known to be a bit buggy. Read about stacks and how to migrate them here: http://docs.heroku.com/stack Cheers, Casper Fabricius On 04/06/2010, at 18.23, knodi wrote: > Can't deploy Rails 2.3.8 Apps to heroku. Heroku logs show this error. > > !! Unexpected error while processing request: private method `split' > called for nil:NilClass > !! Unexpected error while processing request: private method `split' > called for nil:NilClass > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to her...@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Heroku, Rails 3, and Sass
A friend of mine modified Hassle and made this great little writeup: http://mentalized.net/journal/2010/04/06/heroku_rails_3_and_sass/ Cheers, Casper Fabricius -- 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: undo heroku deploy
Hi Orlin, Heroku could definitely use a rollback feature - I hope it's on their list ;) When I started using Heroku I asked about it on this list, and people advised me to tag my releases and then push the previous tag if I needed to rollback. I implemented that and write a blog about it a few months ago: http://casperfabricius.com/site/2009/09/20/manage-and-rollback-heroku-deployments-capistrano-style/ Obviously this means that I don't deploy with "git push heroku" but rather with "rake deploy". Since then, I have improved my Heroku deployment script a bit. The current version is here: http://gist.github.com/307479 Hope this helps. Cheers, Casper Fabricius On 17/02/2010, at 14.06, orlin wrote: > What is the recommended way to undo a bad heroku deploy? I push > something that causes "App failed to start" error. Afaik, the fastest > way to fix that would be: > > git push heroku mybranch:master --force > > Is there a way for git to push a commit instead of a branch? > Otherwise It seems better to deploy from call it a "deploy" branch and > then merge changes into master if they deploy cleanly. > > Also, there seems to be a bug with the .gems to bundler transition. > The .gems manifest gems were uninstalled after switching to Bundler. > But Bundler introduced an error (in my case, require fails for one of > the gems)... Having to rollback to a running app (maintenance mode > doesn't fix such errors), I force-push older code. But, since > the .gems manifest is the same, all the gems turn out missing. Now I > have to push a fake commit that modifies the .gems file (so that it > gets "detected" & thus the gems get reinstalled). Perhaps an explicit > "heroku gems reinstall" command I haven't spotted? > > On a separate note, why would heroku deploy an app - if every single > page produces an "App failed to start" error? > > Luckily, my site is basically unknown at this point, but I would > eventually need a solid deployment process... Any *best practice* > pages out there? > > Regards, > > Orlin > > -- > 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 investigate "Backlog too deep"? (follow-up)
I am in the same boat as Tim. Despite very low traffic and two active dynos, my site tends to go down with a permanent "Backlog too deep" and no other resolution than rebooting the app. It is very frustrating to have the app go down like this from time to other, with no logs and no way to debug it. I have no long running processes in the dynos - everything like that goes to Delayed Job, even sending out emails. Cheers, Casper Fabricius On 27/12/2009, at 19.45, Tim wrote: > There was a thread a few months ago regarding "backlog too deep" that > seems to be closed now: > > http://groups.google.com/group/heroku/search?group=heroku&q=backlog+too+deep++&qt_g=Search+this+group > > I had the same issue this morning. My small Heroku-hosted app went > down showing the "backlog too deep" error. However, checking Google > Analytics and New Relic I can't find anything that would point to > increased traffic (only ~25 visits/day) or a problem with the app > (performance indicators all seem to be within the New Relic default > margins). > > Is there anywhere else I should check? Rebooting the app brought the > site back up, but I'd like to investigate and find out what caused > this, if possible. > > Thanks, > Tim > > -- > > 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.5
Not in this case AFAICS - Rails 2.3.5 requires Rack 1.0.1. When I add "rack --version '1.0.1'" to my .gems manifest, I get an error basically saying I am not allowed to upgrade rack: -> Installing gem rack 1.0.1 from http://gemcutter.org, http://gems.rubyforge.org ERROR: While executing gem ... (Errno::EACCES) Permission denied - /home/group_home/.gem/ruby/1.8/cache/rack-1.0.1.gem ! Heroku push rejected, Slug::CompileError So please upgrade Rack so we can deploy with Rails 2.3.5 :) On 27/11/2009, at 20.10, Oren Teich wrote: > you can use any gem you want, including rails 2.3.5. Simply put it in your > .gems file and it will be automatically installed for you. > > Oren > > On Nov 27, 2009, at 8:56 AM, morgoth wrote: > >> When we will be able to use 2.3.5? >> >> -- >> >> 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: Reading Email
A friend of mine needed the exact same thing on Heroku. He just created a "recursive" delayed job - a job that schedules itself to run 1 minute later, when it has executed. Works fine for him :) Cheers, Casper Fabricius On 06/10/2009, at 21.12, Yuri Niyazov wrote: > > Heroku comes with cron support, but only once an hour. I need it more > often than that, so I have a separate box with actual crond on it, and > it has a script that hits a specific URL on my app on heroku every x > minutes to process email. > > On Tue, Oct 6, 2009 at 3:06 PM, Carl Fyffe > wrote: >> >> Rails makes it so easy to send emails. Recieving emails isn't that >> difficult either, but requires a cron or daemon. What is the best way >> to do this on Heroku today? >> >> Carl >> >>> >> > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Spree on Heroku
Hi, In case anyone is wondering how to run the webshop / e-commerce open source platform "Spree" (http://spreecommerce.com/) on Heroku, I just want to mention that I've created a Spree extension with a tutorial in the readme for doing exactly that :) http://github.com/RSpace/spree-heroku/ Cheers, Casper Fabricius --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~--~~~~--~~--~--~---
Re: Heroku push rejected, error: Unable to append
Yes, I got the exact same error earlier today. I contacted support about it 6 hours ago and haven't heard anything. It seems to be fixed now, though, at least for me. Cheers, Casper Fabricius On 29/09/2009, at 21.31, Shane Becker wrote: > > anyone else getting this error on a push? > > > [master] ~/Sites/zinedistro$ git push heroku master > Counting objects: 14, done. > Delta compression using up to 2 threads. > Compressing objects: 100% (8/8), done. > Writing objects: 100% (10/10), 982 bytes, done. > Total 10 (delta 4), reused 0 (delta 0) > > -> Heroku receiving push > FAILED > ! Heroku push rejected, error: Unable to append to /code/repos/ > 2247/logs/HEAD: Permission denied > fatal: Cannot update the ref 'HEAD'. > > > error: hooks/pre-receive exited with error code 1 > To g...@heroku.com:zinedistro.git > ! [remote rejected] master -> master (pre-receive hook declined) > error: failed to push some refs to 'g...@heroku.com:zinedistro.git' > [master] ~/Sites/zinedistro$ > > > > 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 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: GROUP BY fails on Heroku
Hi Chap, Heroku uses Postgres, not MySQL, and AFAIR, Postgres doesn't allow you to do a SELECT * on a grouped argument, but only select grouped and aggregated columns - something like that anyway ;) You should install Postgres on your development machine and and test your application against a local Postgres database before deploying it to Heroku. Cheers, Casper Fabricius On 17/09/2009, at 07.16, Chap wrote: > > This works great locally on mysql, but gives me an error on heroku: > > Task.find(:all, :group => 'project_id') > > My goal is to find only unique records (according to the project_id > column). > > --~--~-~--~~~---~--~~ 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: Rolling back a failed deploy
Okay, based on Ryan's reply I wrote some rake tasks for deploying and rolling back that others might find helpful: http://pastie.org/582587 It seems work just fine, however the rollback outputs this error: -> Heroku receiving push -> Launching.. done http://darebusters.heroku.com deployed to Heroku error: Trying to write non-commit object c5e59b4a052a7fec2ddc3b7922bd05c7c7272075 to branch refs/heads/master To g...@heroku.com:darebusters.git ! [remote rejected] release-20090813121841 -> master (failed to write) error: failed to push some refs to 'g...@heroku.com:darebusters.git' You'd think that meant the rollback failed, but it does work. I just don't understand the error. Anyone? Cheers, Casper On 09/08/2009, at 19.28, Ryan Tomayko wrote: > > On Sun, Aug 9, 2009 at 10:17 AM, Casper > Fabricius wrote: >> Hi, >> >> I know the Heroku guys (or at least Morten) probably thinks I'm >> thinking too much in the "old" Capistrano terms, and that Heroku aims >> to ensure that a deploy with errors should never get out there. Until >> that happens, however, I'd like to be able to rollback my application >> code on Heroku to a previous version. >> >> I believe the easiest way to do that is to tag each release, but (and >> maybe this is really more of a Git than a Heroku question) I don't >> how >> I'd make the remote Heroku repository "rollback" to a tag, while >> keeping my local repository at HEAD. Is there a way? Does it makes >> sense at all to get some peace of mind like this? :) >> >> What do other people do for this? > > You can roll back to a specific branch, tag, or even commit SHA with > "git push -f". e.g., if you have the version you want to roll back to > tagged as "previous": > >git push -f heroku previous:master > > Or, you want to roll back three commits: > > git push -f heroku HEAD~3:master > > Sometimes I just browse `git log' until I find the commit I want to go > back to and then use the short SHA: > > git push -f heroku a3fe67b:master > > This won't effect your working copy at all. > > This isn't exactly like capistrano's rollback, though. No attempt is > made to rollback database migrations or anything like that. You will > need to do that manually before pushing the previous version. > Something like the following IIRC: > >heroku rake db:migrate VERSION=20090901123000 >git push -f heroku old-version:master > > Really insanely useful technique. We should document that somewhere. > > 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 -~--~~~~--~~--~--~---
Re: Rolling back a failed deploy
Thanks, Ryan. Exactly the Git insight I needed :) Since a deployment can contain any number of commits, I think I'll go with the "previous"- tag strategy for now. It is simple, and I don't remember ever having rollbacked more than one release with Capistrano anyway. On 09/08/2009, at 19.28, Ryan Tomayko wrote: > > On Sun, Aug 9, 2009 at 10:17 AM, Casper > Fabricius wrote: >> Hi, >> >> I know the Heroku guys (or at least Morten) probably thinks I'm >> thinking too much in the "old" Capistrano terms, and that Heroku aims >> to ensure that a deploy with errors should never get out there. Until >> that happens, however, I'd like to be able to rollback my application >> code on Heroku to a previous version. >> >> I believe the easiest way to do that is to tag each release, but (and >> maybe this is really more of a Git than a Heroku question) I don't >> how >> I'd make the remote Heroku repository "rollback" to a tag, while >> keeping my local repository at HEAD. Is there a way? Does it makes >> sense at all to get some peace of mind like this? :) >> >> What do other people do for this? > > You can roll back to a specific branch, tag, or even commit SHA with > "git push -f". e.g., if you have the version you want to roll back to > tagged as "previous": > >git push -f heroku previous:master > > Or, you want to roll back three commits: > > git push -f heroku HEAD~3:master > > Sometimes I just browse `git log' until I find the commit I want to go > back to and then use the short SHA: > > git push -f heroku a3fe67b:master > > This won't effect your working copy at all. > > This isn't exactly like capistrano's rollback, though. No attempt is > made to rollback database migrations or anything like that. You will > need to do that manually before pushing the previous version. > Something like the following IIRC: > >heroku rake db:migrate VERSION=20090901123000 >git push -f heroku old-version:master > > Really insanely useful technique. We should document that somewhere. > > 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 -~--~~~~--~~--~--~---
Rolling back a failed deploy
Hi, I know the Heroku guys (or at least Morten) probably thinks I'm thinking too much in the "old" Capistrano terms, and that Heroku aims to ensure that a deploy with errors should never get out there. Until that happens, however, I'd like to be able to rollback my application code on Heroku to a previous version. I believe the easiest way to do that is to tag each release, but (and maybe this is really more of a Git than a Heroku question) I don't how I'd make the remote Heroku repository "rollback" to a tag, while keeping my local repository at HEAD. Is there a way? Does it makes sense at all to get some peace of mind like this? :) What do other people do for this? Cheers, Casper Fabricius --~--~-~--~~~---~--~~ 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: Adva CMS
Hi Saurabh, I just let Adva create those symlinks locally and added them to my git repository. Git has no problem versioning symbolic links. Then those symlinks becomes a part of the Heroku "slug" package, and thus already exists. Works for me :) Cheers, Casper On 30/07/2009, at 19.44, saur...@safew wrote: > > Actually because the file system is read only id does allow copying of > engines > > and creation of symbolic links. > > Cheers > > Saurabh > > On Jul 30, 10:42 pm, "saur...@safew" > wrote: >> I am trying to get around the symlinks problem, I think heroku is not >> detecting to the symlinks in the public/stylesheets >> >> Thanks all for the replies >> >> Cheers >> >> Saurabh >> On Jul 27, 11:34 pm, Casper Fabricius >> wrote: >> >>> I just replied to Saurabh's similar question on the Adva mailing >>> list. >>> Here's my solution to the problem: >> >>> I have recently deployed an Adva CMS based application to Heroku. It >>> is running fine now, but there are complications. >> >>> Besides from not supporting submodules, the big issue on Heroku is >>> that the application are not allowed to write files on the local >>> disk >>> - except to the /tmp directory of the application. This means two >>> things: >> >>> 1) Migrations won't work because Adva aren't allowed to copy it's >>> migration files to /db/migrations >>> 2) Caching won't work because Rails aren't allowed to write it's >>> cache >>> files to the public folder >> >>> No. 2 is easily resolved by disabling controller caching in /config/ >>> environments/production.rb: >>> config.action_controller.perform_caching = false # We can't do file- >>> based caching on Heroku >> >>> No. 1 can be solved in a number of ways, the easiest being that >>> you do >>> migrations locally and then import your local database to Heroku. >>> This >>> will get you up and running, but is no use once you have production >>> data in your database. For this reason, I have removed Adva's >>> copying >>> of files when migrating and added a rake task that will copy all >>> Adva's migrations from all the Adva engines to /db/migrations - >>> permantly. >> >>> Put this code in /lib/tasks/adva.rake (will both remove Adva's >>> copying >>> and give you the new rake task):http://pastie.org/560590 >> >>> - and run "rake db:copy_adva" to copy Adva's migrations. >> >>> I'm not 100% happy with that solution since I now have a lot of >>> "foreign" migrations laying in my main app, but it works - also on >>> the >>> longer scale. I can run this task everytime I upgrade Adva (which >>> also >>> harder because it can't be a submodule) and make sure I get all the >>> database changes. >> >>> Cheers, >>> Casper Fabriciushttp://casperfabricius.com >> >>> On 27/07/2009, at 19.54, saur...@safew wrote: >> >>>> Hi there, >> >>>> I am trying to install adva cms over Heroku. I am facing this >>>> problem, >> >>>> saur...@laptop:~/adva/adva$ heroku rake adva:install >>>> rake aborted! >>>> Read-only file system - /disk1/home/slugs/34680_13540ed_19fb/mnt/ >>>> db/ >>>> migrate/app >> >>>> (See full trace by running task with --trace) >>>> (in /disk1/home/slugs/34680_13540ed_19fb/mnt) >> >>>> adva is based on Rails engines and all the migrations lie in the >>>> engines.is this a problem because of that ? > > --~--~-~--~~~---~--~~ 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: Adva CMS
I just replied to Saurabh's similar question on the Adva mailing list. Here's my solution to the problem: I have recently deployed an Adva CMS based application to Heroku. It is running fine now, but there are complications. Besides from not supporting submodules, the big issue on Heroku is that the application are not allowed to write files on the local disk - except to the /tmp directory of the application. This means two things: 1) Migrations won't work because Adva aren't allowed to copy it's migration files to /db/migrations 2) Caching won't work because Rails aren't allowed to write it's cache files to the public folder No. 2 is easily resolved by disabling controller caching in /config/ environments/production.rb: config.action_controller.perform_caching = false # We can't do file- based caching on Heroku No. 1 can be solved in a number of ways, the easiest being that you do migrations locally and then import your local database to Heroku. This will get you up and running, but is no use once you have production data in your database. For this reason, I have removed Adva's copying of files when migrating and added a rake task that will copy all Adva's migrations from all the Adva engines to /db/migrations - permantly. Put this code in /lib/tasks/adva.rake (will both remove Adva's copying and give you the new rake task): http://pastie.org/560590 - and run "rake db:copy_adva" to copy Adva's migrations. I'm not 100% happy with that solution since I now have a lot of "foreign" migrations laying in my main app, but it works - also on the longer scale. I can run this task everytime I upgrade Adva (which also harder because it can't be a submodule) and make sure I get all the database changes. Cheers, Casper Fabricius http://casperfabricius.com On 27/07/2009, at 19.54, saur...@safew wrote: > > Hi there, > > I am trying to install adva cms over Heroku. I am facing this problem, > > saur...@laptop:~/adva/adva$ heroku rake adva:install > rake aborted! > Read-only file system - /disk1/home/slugs/34680_13540ed_19fb/mnt/db/ > migrate/app > > (See full trace by running task with --trace) > (in /disk1/home/slugs/34680_13540ed_19fb/mnt) > > adva is based on Rails engines and all the migrations lie in the > engines.is this a problem because of that ? > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---