Jason Hsu, Mr. Swift Linux
2011-Nov-13 21:59 UTC
How do you execute "rails runner" in Heroku?
I''m going through the 4th edition of the book _Agile Web Development in Rails_. One of the exercises involves automatically creating 100 orders. The command to run locally is "rails runner script/load_orders.rb". I have no problems here - it works. What''s the command for running this in the deployed Heroku application? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2011/11/13 Jason Hsu, Mr. Swift Linux <jhsu802701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> What''s the command for running this in the deployed Heroku application?I did a quick peek in the heroku docs: http://devcenter.heroku.com/articles/oneoff-admin-ps BUT! I cant use "heroku run rails <anything>", some further digging in the docs showed me, that on my stack (Bamboo) this is not possible, you need to have the Cedarstack. This is something that you can find with some thinking-around-corners :( Why I think it is like mentioned above: * The way described in <http://devcenter.heroku.com/articles/oneoff-admin-ps> does simply not work * In another section of the help there is the article <http://devcenter.heroku.com/articles/rake>, just above the article is a yellow box with the following content: "This article applies to apps on the Aspen or Bamboo stacks. For Cedar, see one-off admin proceseses." Where the last words are a link to the other article. These two in combination made me think that we need a Cedarstack to use "heroku run rails <anything>". Since the Cedarstack is the only one that supports the assetpipeline, I think we should consider the change :D It is a pitty that Cedar is not the default stack when creating new apps... HTH Norbert -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.